Skip to content

Commit

Permalink
refactor: [#615] new action and reordered old ones for cohesion
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-nt committed Aug 3, 2024
1 parent 0ac5f9b commit 4f6ea18
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/services/authorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ impl fmt::Display for UserRole {

#[derive(Debug, Clone, Serialize, Deserialize, Hash)]
pub enum ACTION {
GetCategories,
AddCategory,
DeleteCategory,
GetSettings,
GetSettingsSecret,
GetTags,
AddTag,
DeleteTag,
DeleteTorrent,
BanUser,
GetAboutPage,
GetLicensePage,
GetCategories,
GetTags,
GetImageByUrl,
}

pub struct Service {
Expand Down Expand Up @@ -179,10 +180,11 @@ impl CasbinConfiguration {
admin, DeleteTag
admin, DeleteTorrent
admin, BanUser
guest, GetAboutPage
guest, GetLicensePage
registered, GetImageByUrl
guest, GetCategories
guest, GetTags
guest, GetAboutPage
guest, GetLicensePage
",
),
}
Expand Down

0 comments on commit 4f6ea18

Please sign in to comment.