Skip to content
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

Admin cannot get and delete another user's space #4194

Closed
ScharfViktor opened this issue Jul 13, 2022 · 3 comments
Closed

Admin cannot get and delete another user's space #4194

ScharfViktor opened this issue Jul 13, 2022 · 3 comments
Labels

Comments

@ScharfViktor
Copy link
Contributor

After deleting a user, the user's personal and project spaces still exist.
Of course the user can delete all his data before leaving the company (for example).

But what to do with the data when the user is deleted?
here is two way:

  • automatically delete all data during the deletion of a user
  • admin should be able to delete user's data and for this we should fix:

GET personal and project space another user:
curl -vk 'https://localhost:9200/graph/v1.0/drives/personalSpaceDeletedUserUUID' -u admin:admin -vk 404 not found

2022-07-13T15:17:56+02:00 ERR failed to list storage spaces error="error: permission denied: user admin is not allowed to Stat the space 534bb038-6f9d-4093-946f-133be61fa4e7" filters=[{"Term":{"Id":{"opaque_id":"1284d238-aa92-42ce-bdc4-0b0000009157$534bb038-6f9d-4093-946f-133be61fa4e7!534bb038-6f9d-4093-946f-133be61fa4e7"}},"type":2},{"Term":{"SpaceType":"+grant"},"type":4}] pkg=rgrpc service=storage-users status={"code":8,"message":"permission denied","trace":"00000000000000000000000000000000"} traceid=00000000000000000000000000000000 2022-07-13T15:17:56+02:00 ERR no space found driveID=1284d238-aa92-42ce-bdc4-0b0000009157$534bb038-6f9d-4093-946f-133be61fa4e7 service=graph

DELETE personal/project space:
curl -vk -XDELETE 'https://localhost:9200/graph/v1.0/drives/personalSpaceDeletedUserUUID' -u admin:admin -vk 403

2022-07-13T15:27:49+02:00 ERR failed to delete storage space error="error: permission denied: user is not allowed to delete spaces 534bb038-6f9d-4093-946f-133be61fa4e7" pkg=rgrpc service=storage-users status={"code":8,"message":"permission denied","trace":"00000000000000000000000000000000"} storage_space_id={"opaque_id":"1284d238-aa92-42ce-bdc4-0b0000009157$534bb038-6f9d-4093-946f-133be61fa4e7"} traceid=00000000000000000000000000000000

@micbar @individual-it @pmaier1 what do you think?

@pmaier1
Copy link
Contributor

pmaier1 commented Jul 13, 2022

I think the behavior is mostly as designed. Admins should not be able to access/delete personal spaces of other users. Instead, deleting a user should also delete their personal space. For project spaces we still need a permission that can be assigned to an administrative role to allow certain people to manage e.g., orphaned spaces.

@phil-davis
Copy link
Contributor

oC10 has the ability to disable a user - that allows an organisation to keep a user's storage intact for a while when they leave, and some time later decide to actually delete the user (which deletes their personal storage also). Is that sort of feature/workflow to be available?

@ScharfViktor
Copy link
Contributor Author

I think the behavior is mostly as designed. Admins should not be able to access/delete personal spaces of other users. Instead, deleting a user should also delete their personal space. For project spaces we still need a permission that can be assigned to an administrative role to allow certain people to manage e.g., orphaned spaces.

Thank you for the clarification. Then I'll restate the issue as: #4195 and #4196

I close issue. I think Phil's question can be answered in this closed task or create new topic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants