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

Add documentation explaining the permission system #297

Merged
merged 6 commits into from
Sep 6, 2024

Conversation

dalonsoa
Copy link
Collaborator

@dalonsoa dalonsoa commented Sep 4, 2024

In particular, what users can or cannot do depending on their status.

It also makes several changes to the code to actually enforce what is being explained.

@dalonsoa dalonsoa changed the base branch from develop to update_readme September 4, 2024 06:54
@dalonsoa dalonsoa linked an issue Sep 4, 2024 that may be closed by this pull request
Copy link
Contributor

@Sahil590 Sahil590 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@tsmbland tsmbland left a comment

Choose a reason for hiding this comment

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

Looks good. Just a few typos. It would also be worth talking about Station objects, which have three visibility levels (public, private, internal), which controls the visibility of measurements associated with the station


## Objects visibility

The **visibility** attribute of all objects in the database (except for measurements) control if the object can be viewed by annonymous users and referenced by other registered users in their own objects. When creating a new object, users must be careful to select a visibility level appropriate for their use case (public or private). If the object is public, then it can be referenced by other objects of other users and therefore it will not be possible to delete it, should that be necessary at some point, since the owner of the object will not have access to the associated objects referencing their own.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The **visibility** attribute of all objects in the database (except for measurements) control if the object can be viewed by annonymous users and referenced by other registered users in their own objects. When creating a new object, users must be careful to select a visibility level appropriate for their use case (public or private). If the object is public, then it can be referenced by other objects of other users and therefore it will not be possible to delete it, should that be necessary at some point, since the owner of the object will not have access to the associated objects referencing their own.
The **visibility** attribute of all objects in the database (except for measurements) control if the object can be viewed by anonymous users and referenced by other registered users in their own objects. When creating a new object, users must be careful to select a visibility level appropriate for their use case (public or private). If the object is public, then it can be referenced by other objects of other users and therefore it will not be possible to delete it, should that be necessary at some point, since the owner of the object will not have access to the associated objects referencing their own.

@tsmbland
Copy link
Member

tsmbland commented Sep 5, 2024

I think the permissions levels for stations are:

  • Public: all users can view measurements
  • Internal: measurements cannot be viewed by anonymous users
  • Private: only the station owner can view measurements

dalonsoa and others added 2 commits September 6, 2024 05:25
Co-authored-by: Tom Bland <tom_bland@hotmail.co.uk>
@dalonsoa
Copy link
Collaborator Author

dalonsoa commented Sep 6, 2024

Good point! Have a look at the changes in 0e86559 explaining the internal bit.

Copy link
Member

@tsmbland tsmbland left a comment

Choose a reason for hiding this comment

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

LGTM!

Base automatically changed from update_readme to develop September 6, 2024 09:43
@dalonsoa dalonsoa merged commit 46cfb04 into develop Sep 6, 2024
7 checks passed
@dalonsoa dalonsoa deleted the docs_permission branch September 6, 2024 09:48
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.

Add documentation on the permission system
3 participants