Repository navigation
feat(settings): add ExternalShare.Write permission for Admin and Space Admin - #4088
dragonchaser wants to merge 1 commit into
Conversation
Signed-off-by: Julian Koberg <[email protected]>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 11 |
🟢 Coverage 23.91% diff coverage · 0.00% coverage variation
Metric Results Coverage variation ✅ 0.00% coverage variation (-1.00%) Diff coverage ✅ 23.91% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (627c375) 94312 28352 30.06% Head commit (938bc8f) 94348 (+36) 28361 (+9) 30.06% (0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#4088) 46 11 23.91% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
hm, nothing calls // Invite, when the recipient is unknown
if s.config.MultiInstance.Enabled && s.hasExternalSharePermission(ctx) {
user, err = s.identityBackend.AddUser(ctx, objectID, s.config.MultiInstance.InstanceID)
}// GetUsers, precise lookup by username + instancename
case username != "" && instancename != "" && g.contextUserHasExternalSharePermission(r.Context()):
users[0], err = g.identityBackend.GetPreciseUser(r.Context(), username, instancename, odataReq)IMO this should wait for the multi-instance port and then go in with both checks and unit tests for granted / denied. Until then I'd rather not ship the permission. Some things I'd change regardless:
|
Adds the ExternalShare.Write permission (sharing with users on other instances) to the default Admin and Space Admin roles and wires its check into graph; nothing calls the check yet because OpenCloud has no multi-instance sharing, so the only visible change is the new permission in those roles.
AI assistance: Claude Code (claude-opus-5-5) ported the change and adapted it to the current code.