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

non personal spaces need no owner #3091

Merged
merged 1 commit into from
Jul 29, 2022
Merged

non personal spaces need no owner #3091

merged 1 commit into from
Jul 29, 2022

Conversation

micbar
Copy link
Member

@micbar micbar commented Jul 20, 2022

Description

Project spaces should not have a real user as an owner.

That fixes the bug when the space creator leaves the space and is no longer granted access to the space.

@butonic @kobergj @dragotin

Solution approach

Public links will become the new unified links. Therefore they will have a longer lifecycle than public links.
Inside a space, we need a stable way to access a public link regardless of the users which can join or leave the space at any time.

This PR assigns an owner with the spaceID as UserID and type invalid as a space owner. In this way, the public link scoped token authentication can work in the same way like inside of a personal space.

@C0rby JFYI

@micbar micbar force-pushed the space-owner branch 2 times, most recently from 5c1fe2b to d38592a Compare July 22, 2022 13:11
@micbar micbar marked this pull request as ready for review July 22, 2022 13:14
@micbar micbar requested review from a team, labkode, ishank011 and glpatcern as code owners July 22, 2022 13:14
@micbar micbar requested a review from dragotin July 22, 2022 14:37
pkg/utils/utils.go Outdated Show resolved Hide resolved
pkg/utils/utils.go Outdated Show resolved Hide resolved
pkg/utils/utils.go Outdated Show resolved Hide resolved
@butonic
Copy link
Contributor

butonic commented Jul 25, 2022

I like the concept, however, naming is hard. I don't think this is a 'virtual' user. Conceptually, it represents no user, aka nobody in unix ... well ... in unix nobody should never 'own' any files or folders ...

pkg/utils/utils.go Outdated Show resolved Hide resolved
pkg/utils/utils.go Outdated Show resolved Hide resolved
@micbar micbar marked this pull request as draft July 25, 2022 11:53
@micbar
Copy link
Member Author

micbar commented Jul 25, 2022

After checking the public link auth, this needs another approach.

@micbar micbar force-pushed the space-owner branch 6 times, most recently from f1514eb to 6ab8cd4 Compare July 26, 2022 16:11
@micbar
Copy link
Member Author

micbar commented Jul 26, 2022

@butonic @kobergj @dragotin

Solution approach

Public links will become the new unified links. Therefore they will have a longer lifecycle than public links.
Inside a space, we need a stable way to access a public link regardless of the users which can join or leave the space at any time.

This PR assigns an owner with the spaceID as UserID and type invalid as a space owner. In this way, the public link scoped token authentication can work in the same way like inside of a personal space.

@C0rby JFYI

@micbar micbar changed the title non personal spaces need virtual owner non personal spaces need no owner Jul 26, 2022
@micbar micbar marked this pull request as ready for review July 26, 2022 16:35
@micbar micbar marked this pull request as draft July 26, 2022 16:36
@micbar micbar force-pushed the space-owner branch 3 times, most recently from 3e79826 to d3797f0 Compare July 27, 2022 20:06
@micbar micbar marked this pull request as ready for review July 28, 2022 07:00
@micbar micbar force-pushed the space-owner branch 2 times, most recently from 4f9f9f4 to 063b4f0 Compare July 28, 2022 15:10
@micbar micbar marked this pull request as draft July 28, 2022 15:34
@butonic
Copy link
Contributor

butonic commented Jul 28, 2022

While I am not happy with using an invalid user type, we can update the CS3 api with a new USER_TYPE_SPACE_OWNER ... hm maybe we should then use 8 (the next free int, which would be assigned to USER_TYPE_SPACE_OWNER) before merging this?

@micbar
Copy link
Member Author

micbar commented Jul 29, 2022

@butonic done

@micbar micbar marked this pull request as ready for review July 29, 2022 06:57
@micbar micbar requested a review from phil-davis July 29, 2022 06:59
@micbar micbar merged commit 7886cc2 into cs3org:edge Jul 29, 2022
@micbar micbar deleted the space-owner branch July 29, 2022 07:28
@micbar micbar mentioned this pull request Aug 11, 2022
26 tasks
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.

4 participants