Skip to content

Rename role for consistency (leftover from change in v3) #10871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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