Grant delete_any_post and delete_any_profile permissions to admin role
This commit is contained in:
parent
b80b827fde
commit
e3ee144889
4 changed files with 9 additions and 0 deletions
|
@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Documented valid role names for `set-role` command.
|
- Documented valid role names for `set-role` command.
|
||||||
|
- Granted `delete_any_post` and `delete_any_profile` permissions to admin role.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -1782,6 +1782,8 @@ components:
|
||||||
enum:
|
enum:
|
||||||
- create_follow_request
|
- create_follow_request
|
||||||
- create_post
|
- create_post
|
||||||
|
- delete_any_post
|
||||||
|
- delete_any_profile
|
||||||
- manage_subscription_options
|
- manage_subscription_options
|
||||||
Signature:
|
Signature:
|
||||||
type: object
|
type: object
|
||||||
|
|
|
@ -84,6 +84,8 @@ impl ApiRole {
|
||||||
match permission {
|
match permission {
|
||||||
Permission::CreateFollowRequest => "create_follow_request",
|
Permission::CreateFollowRequest => "create_follow_request",
|
||||||
Permission::CreatePost => "create_post",
|
Permission::CreatePost => "create_post",
|
||||||
|
Permission::DeleteAnyPost => "delete_any_post",
|
||||||
|
Permission::DeleteAnyProfile => "delete_any_profile",
|
||||||
Permission::ManageSubscriptionOptions =>
|
Permission::ManageSubscriptionOptions =>
|
||||||
"manage_subscription_options",
|
"manage_subscription_options",
|
||||||
}.to_string()
|
}.to_string()
|
||||||
|
|
|
@ -29,6 +29,8 @@ pub struct DbInviteCode {
|
||||||
pub enum Permission {
|
pub enum Permission {
|
||||||
CreateFollowRequest,
|
CreateFollowRequest,
|
||||||
CreatePost,
|
CreatePost,
|
||||||
|
DeleteAnyPost,
|
||||||
|
DeleteAnyProfile,
|
||||||
ManageSubscriptionOptions,
|
ManageSubscriptionOptions,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +68,8 @@ impl Role {
|
||||||
Self::Admin => vec![
|
Self::Admin => vec![
|
||||||
Permission::CreateFollowRequest,
|
Permission::CreateFollowRequest,
|
||||||
Permission::CreatePost,
|
Permission::CreatePost,
|
||||||
|
Permission::DeleteAnyPost,
|
||||||
|
Permission::DeleteAnyProfile,
|
||||||
Permission::ManageSubscriptionOptions,
|
Permission::ManageSubscriptionOptions,
|
||||||
],
|
],
|
||||||
Self::ReadOnlyUser => vec![
|
Self::ReadOnlyUser => vec![
|
||||||
|
|
Loading…
Reference in a new issue