-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
if err != nil { | ||
l.Err(err).Str("bundle", bundleID).Str("setting", permissionRequests[i].Setting.Id).Msg("Error adding setting to bundle") | ||
} else { | ||
l.Info().Str("bundle", bundleID).Str("setting", res.Setting.Id).Msg("Successfully added setting to bundle") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make that Debug
? otherwise the logs will get boring quickly... unless this is happening only once at the start of the service, in which case it's ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only happens once on service start.
Setting: &settings.Setting{ | ||
Id: "7d81f103-0488-4853-bce5-98dcce36d649", | ||
Name: "language-create", | ||
DisplayName: "Permission to set the language", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a way to translate those display names yet ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in the services. The displayname is shown in the UI and transifex is used on it, but since this is dynamically rendered, I'm sure that transifex is not able to pick those strings, yet. Needs investigation or some help from the transifex gods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, | ||
Value: &settings.Setting_PermissionValue{ | ||
PermissionValue: &settings.Permission{ | ||
Operation: settings.Permission_OPERATION_CREATE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so setting the language is an act of creation ? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have CREATE and UPDATE as separate operations. There are permissions for both. CREATE on first request, UPDATE on subsequent requests. The operation is one of the two things I wanted to discuss with Jörn, both Alex and myself were not too happy with it so far... but still, this reflects our current iteration. 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks for clarifying
do we have tickets to track the things I mentioned ?
c5da550
to
e695ccc
Compare
Yes, now :-) thanks for reviewing and for your comments! |
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- pkg/service/v0/settings.go 2
Clones added
============
- pkg/service/v0/settings.go 9
See the complete overview on Codacy |
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
We have default roles in ocis-settings and the respective bundle uuids are exposed there as constants. This PR adds permissions for the language to the default roles. We're not filtering for those, though, so this is only setting up the data basis for permission filtering later on.