[NFTs] Rework permissions model (#13482)
* Disallow admin to transfer or burn items he doesn't own * lock_collection should be accessible by collection's owner only * Allow admin to access lock_item_properties() * Fix do_lock_item_properties * Move update_mint_settings() to Issuer * Rename check_owner to check_origin * Typo * Make admin to be in charge of managing the metadata * Make admin the main attributes manager * offchain mint should be signed by Issuer * Remove the special case when the Issuer calls the mint() function * Rework burn and destroy methods * Return back item_metadatas * Don't repatriate the deposit on transfer * A bit more tests * One more test * Add migration * Chore * Clippy * Rename to owned_item * Address comments * Replace .filter_map with .find_map * Improve version validation in pre_upgrade() * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_nfts --------- Co-authored-by: parity-processbot <>
Showing
- substrate/frame/nfts/src/benchmarking.rs 84 additions, 16 deletionssubstrate/frame/nfts/src/benchmarking.rs
- substrate/frame/nfts/src/features/approvals.rs 3 additions, 9 deletionssubstrate/frame/nfts/src/features/approvals.rs
- substrate/frame/nfts/src/features/attributes.rs 22 additions, 35 deletionssubstrate/frame/nfts/src/features/attributes.rs
- substrate/frame/nfts/src/features/create_delete_collection.rs 10 additions, 12 deletions...trate/frame/nfts/src/features/create_delete_collection.rs
- substrate/frame/nfts/src/features/create_delete_item.rs 18 additions, 6 deletionssubstrate/frame/nfts/src/features/create_delete_item.rs
- substrate/frame/nfts/src/features/lock.rs 7 additions, 10 deletionssubstrate/frame/nfts/src/features/lock.rs
- substrate/frame/nfts/src/features/metadata.rs 40 additions, 26 deletionssubstrate/frame/nfts/src/features/metadata.rs
- substrate/frame/nfts/src/features/roles.rs 15 additions, 0 deletionssubstrate/frame/nfts/src/features/roles.rs
- substrate/frame/nfts/src/features/settings.rs 6 additions, 5 deletionssubstrate/frame/nfts/src/features/settings.rs
- substrate/frame/nfts/src/features/transfer.rs 0 additions, 10 deletionssubstrate/frame/nfts/src/features/transfer.rs
- substrate/frame/nfts/src/lib.rs 69 additions, 71 deletionssubstrate/frame/nfts/src/lib.rs
- substrate/frame/nfts/src/migration.rs 117 additions, 0 deletionssubstrate/frame/nfts/src/migration.rs
- substrate/frame/nfts/src/tests.rs 107 additions, 38 deletionssubstrate/frame/nfts/src/tests.rs
- substrate/frame/nfts/src/types.rs 6 additions, 4 deletionssubstrate/frame/nfts/src/types.rs
- substrate/frame/nfts/src/weights.rs 466 additions, 562 deletionssubstrate/frame/nfts/src/weights.rs
Please register or sign in to comment