Skip to content

feat(permissions): new permissions for personal spaces - #3876

Open
maki5 wants to merge 5 commits into
opencloud-eu:mainfrom
maki5:feat/personal_space_permissions
Open

maki5 wants to merge 5 commits into
opencloud-eu:mainfrom
maki5:feat/personal_space_permissions

Conversation

@maki5

@maki5 maki5 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor
  • added new Drives.ListPersonal and Drives.ReadWritePersonal permissions, granted to the admin and service-account roles only.
  • Drives.List and Drives.ReadWrite are now project-space scoped

depends on: opencloud-eu/reva#963
closes: #2979

@codacy-production

codacy-production Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

🟢 Coverage 0.00% diff coverage · -0.01% coverage variation

Metric Results
Coverage variation ✅ -0.01% coverage variation (-1.00%)
Diff coverage ✅ 0.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (43211c1) 94312 28356 30.07%
Head commit (38e836b) 94350 (+38) 28354 (-2) 30.05% (-0.01%)

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 (#3876) 42 0 0.00%

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.

@maki5
maki5 requested review from aduffeck and rhafer and a balanced review from Copilot and removed request for Copilot November 2, 2026 11:31

@rhafer rhafer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the Reva fix is included, tests/acceptance/features/apiSpaces/spaceManagement.feature:52-79 will fail: it explicitly expects a Space Admin to see another user’s personal space. The disable scenario at lines 153–162 also expects the old access behavior.

Maybe it's worth to have a CI run of this together with the related reva bump?

@maki5
maki5 force-pushed the feat/personal_space_permissions branch 2 times, most recently from c28121b to 64fd66b Compare November 9, 2026 11:45
@pbleser-oc

Copy link
Copy Markdown
Member

Hi @maki5, I had a look at the failed CI run of this PR (pipeline 5059), in case it helps:

  • The unit test TestClientIPWithoutTrustedProxies panics in pkg/middleware. That isn't caused by your change: the branch raises chi to v5.4.0, whose ClientIPFromXFF panics without trusted proxies, and main has the same version by now together with the fix in pkg/middleware/client_ip.go. A rebase onto main should resolve it.
  • In apiGraphUserGroup/getUser.feature, the Space Admin examples of "admin user gets the drive information of a user with different user role" (lines 1183-1185) still expect 200. With the new permissions, a Space Admin no longer gets another user's personal drive, so these examples need to change, like the scenario in spaceManagement.feature.
  • The other failures in apiGraphUserGroup (getUser.feature lines 84-86, 628-630 and 645-647, getGroup.feature, addUserToGroup.feature) fail for every role, not only for Space Admins, and are about users and groups rather than drives, so they look unrelated. A run after the rebase would tell.

The disable scenario rhafer mentioned already expects 404 for the Space Admin now.

@maki5
maki5 force-pushed the feat/personal_space_permissions branch 2 times, most recently from c7a3171 to afc7886 Compare November 17, 2026 12:48
@maki5

maki5 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@rhafer @aduffeck @pbleser-oc I rebased this pr and fixed the failing tests, the reva pr is also rebased and for now referenced in this pr, if you are ok with the changes I would be happy to start merging reva and this pr to main

@pbleser-oc
pbleser-oc requested a review from rhafer November 17, 2026 15:00
@pbleser-oc

Copy link
Copy Markdown
Member

Thanks @maki5, the rebase fixed the unit test, and the getUser.feature and spaceManagement.feature changes are what I had in mind. From my side this is good to go once rhafer is happy with it.

@maki5
maki5 force-pushed the feat/personal_space_permissions branch from 0736dac to 38e836b Compare November 20, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refine SpaceAdmin privileges to personal spaces

4 participants