Skip to content

Commit

Permalink
Merge pull request #10871 from owncloud/rename_bunlde_for_consistency
Browse files Browse the repository at this point in the history
Rename role for consistency (leftover from change in v3)
  • Loading branch information
2403905 authored Jan 14, 2025
2 parents b4cf38f + 4aab3a2 commit ce1cf9c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/consistenly-name-roles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Consistently name roles

BundleUUIDRoleGuest has been renamed to BundleUUIDRoleUserLight for consistency reasons

https://github.com/owncloud/ocis/pull/10871
2 changes: 1 addition & 1 deletion services/proxy/pkg/userroles/defaultrole.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (d defaultRoleAssigner) UpdateUserRoleAssignment(ctx context.Context, user
if user.Id.Type == cs3.UserType_USER_TYPE_PRIMARY || user.Id.Type == cs3.UserType_USER_TYPE_GUEST {
roleId := settingsService.BundleUUIDRoleUser
if user.Id.Type == cs3.UserType_USER_TYPE_GUEST {
roleId = settingsService.BundleUUIDRoleGuest
roleId = settingsService.BundleUUIDRoleUserLight
}
d.logger.Info().Str("userid", user.Id.OpaqueId).Msg("user has no role assigned, assigning default user role")
ctx = metadata.Set(ctx, middleware.AccountID, user.Id.OpaqueId)
Expand Down
5 changes: 3 additions & 2 deletions services/settings/pkg/service/v0/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ const (
// BundleUUIDRoleUser represents the user role.
BundleUUIDRoleUser = "d7beeea8-8ff4-406b-8fb6-ab2dd81e6b11"

// BundleUUIDRoleGuest represents the guest role.
BundleUUIDRoleGuest = "38071a68-456a-4553-846a-fa67bf5596cc"
// BundleUUIDRoleUserLight represents the light role.
// BundleUUIDRoleGuest has been renamed to BundleUUIDRoleUserLight for consistency reasons
BundleUUIDRoleUserLight = "38071a68-456a-4553-846a-fa67bf5596cc"

// RoleManagementPermissionID is the hardcoded setting UUID for the role management permission
RoleManagementPermissionID string = "a53e601e-571f-4f86-8fec-d4576ef49c62"
Expand Down
1 change: 1 addition & 0 deletions services/settings/pkg/store/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const (
// BundleUUIDRoleUser represents the user role.
BundleUUIDRoleUser = "d7beeea8-8ff4-406b-8fb6-ab2dd81e6b11"
// BundleUUIDRoleUserLight represents the user light role.
// BundleUUIDRoleGuest has been renamed to BundleUUIDRoleUserLight for consistency reasons
BundleUUIDRoleUserLight = "38071a68-456a-4553-846a-fa67bf5596cc"
// BundleUUIDProfile represents the user profile.
BundleUUIDProfile = "2a506de7-99bd-4f0d-994e-c38e72c28fd9"
Expand Down

0 comments on commit ce1cf9c

Please sign in to comment.