mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 23:27:04 +00:00
App Passwords: Introduce fine grained capabilities.
Previously, all permission checks for using app passwords were implemented using `edit_user`. This commit introduces a series of more fine grained meta capabilities that should be used instead: `create_app_password`, `list_app_passwords`, `read_app_password`, `edit_app_password`, `delete_app_password` and `delete_app_passwords`. These capabilities all map to `edit_user` by default, but may now be customized by developers. Props johnbillion, TimothyBlynJacobs. Fixes #51703. git-svn-id: https://develop.svn.wordpress.org/trunk@50114 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -522,7 +522,13 @@ class Tests_User_Capabilities extends WP_UnitTestCase {
|
||||
$expected['delete_user'],
|
||||
$expected['edit_user_meta'],
|
||||
$expected['delete_user_meta'],
|
||||
$expected['add_user_meta']
|
||||
$expected['add_user_meta'],
|
||||
$expected['create_app_password'],
|
||||
$expected['list_app_passwords'],
|
||||
$expected['read_app_password'],
|
||||
$expected['edit_app_password'],
|
||||
$expected['delete_app_passwords'],
|
||||
$expected['delete_app_password']
|
||||
);
|
||||
|
||||
$expected = array_keys( $expected );
|
||||
|
||||
Reference in New Issue
Block a user