Skip to content

Commit ef0c1e7

Browse files
committed
refactor: [#658] More renaming
1 parent b4108dc commit ef0c1e7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/services/authorization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub enum ACTION {
5252
GetCanonicalInfoHash,
5353
ChangePassword,
5454
BanUser,
55-
GetUsers,
55+
GetUserProfiles,
5656
}
5757

5858
pub struct Service {
@@ -249,7 +249,7 @@ impl Default for CasbinConfiguration {
249249
admin, GetCanonicalInfoHash
250250
admin, ChangePassword
251251
admin, BanUser
252-
admin, GetUsers
252+
admin, GetUserProfiles
253253
registered, GetAboutPage
254254
registered, GetLicensePage
255255
registered, GetCategories

src/services/user.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ impl ListingService {
344344
///
345345
/// This function will return a error if there is a database error retrieving the profiles:
346346
pub async fn get_user_profiles(&self, maybe_user_id: Option<UserId>) -> Result<Vec<UserProfile>, ServiceError> {
347-
self.authorization_service.authorize(ACTION::GetUsers, maybe_user_id).await?;
347+
self.authorization_service
348+
.authorize(ACTION::GetUserProfiles, maybe_user_id)
349+
.await?;
348350

349351
let users = self.user_profile_repository.get_all_user_profiles().await?;
350352

0 commit comments

Comments
 (0)