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

Space without space manager #6353

Closed
NannaBarz opened this issue May 19, 2023 · 10 comments
Closed

Space without space manager #6353

NannaBarz opened this issue May 19, 2023 · 10 comments
Assignees
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug

Comments

@NannaBarz
Copy link
Contributor

It is possible to have a space without space owner

Steps to reproduce:

  1. The space has two space manager
  2. Space manager A removes the rights from space manager B
  3. Space manager B removes at the same time the rights from space manager A
  4. After refresh the space has no space manager
@micbar micbar added the Priority:p2-high Escalation, on top of current planning, release blocker label May 22, 2023
@kobergj kobergj self-assigned this May 22, 2023
@kobergj
Copy link
Collaborator

kobergj commented May 22, 2023

Needs clarification:

  • How to reproduce easily?
  • Expected behaviour?

@dragonchaser
Copy link
Member

related: #5967

@kobergj
Copy link
Collaborator

kobergj commented May 24, 2023

@NannaBarz we need your help here. It looks like a blocking issue for ocis but I cannot reproduce it locally. Can you add some insights on how we can reproduce it? It seems complicated as both request need to be processed at the same time...

@NannaBarz
Copy link
Contributor Author

On https://0001.schule.owncloud.works/ I created a Space "Test Space"
I added k.wulf and gave her "kann verwalten" rights
Bildschirmfoto 2023-05-24 um 15 27 58

Now she remove her rights to "kann anzeigen"
And I removed mine to "kann anzeigen"

After a refresh both have "kann anzeigen" rights and no Spaceadmin is there

Bildschirmfoto 2023-05-24 um 15 33 14

I'm sorry that I wrote it wrong in the first post.

@micbar
Copy link
Contributor

micbar commented May 24, 2023

Right! Big Facepalm 🤦

@kobergj @kulmann we did something interesting.

Changes on the space permissions are using POST Requests, which in the backend triggers addSpaceMember(). This method does not check for a remaining manager. removeSpaceMember() checks it.

This only works if Anja and Katharina Wulf do not reload the page, because the web client doesn't show the operation when only one manager is present. That the backend allows that operation is also not correct.

Next finding: When i implement a check the backend returns Status 200 and an error inside the ocs error payload. The webUI doesn't show that error.

<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>error</status>
    <statuscode>403</statuscode>
    <message>can&#39;t remove the last manager</message>
  </meta>
</ocs>

@micbar
Copy link
Contributor

micbar commented May 24, 2023

@kobergj quick draft for a fix in cs3org/reva#3917

@kobergj
Copy link
Collaborator

kobergj commented May 25, 2023

Hehe. Ja, I found that out too. Looks like we did some double work. Had some comments on the fix. I'll assign this ticket to you since you seem eager to take it 😉

@kobergj kobergj assigned micbar and unassigned kobergj May 25, 2023
@kulmann
Copy link
Member

kulmann commented May 25, 2023

Needing to expect / check for an error after having a 200 status code is a pretty weird requirement 😢

@kobergj
Copy link
Collaborator

kobergj commented May 25, 2023

Reading the PR it should return 403 not 200. Where does the 200 come from?

@kobergj
Copy link
Collaborator

kobergj commented May 31, 2023

Fix is in ocis master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug
Projects
Archived in project
Development

No branches or pull requests

5 participants