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

[docs] Explain default permission groups (Admnistrator and Operator) #380

Open
nemesifier opened this issue Oct 25, 2018 · 5 comments
Open

Comments

@nemesifier
Copy link
Member

nemesifier commented Oct 25, 2018

Document what will be discussed and decided on this mailing list discussion:

Default permisions: administrators and operators

Related to:

@PabloCastellano
Copy link
Contributor

PabloCastellano commented Apr 16, 2020

During my onboarding to OpenWISP I wrote down a few User definitions that might be added to the documentation too. I found them specially useful when trying to reproduce bugs following instructions. Please review

Django admin/superuser

User.objects.create_user(is_staff=True, is_superuser=True)
# or User.objects.create_superuser()

Django staff user

User.objects.create_user(is_staff=True)

OpenWISP user

User.objects.create_user() # Belongs to 'default' organization

OpenWISP operator

User.objects.create_user(is_staff=True)
OrganizationUser(is_admin=False))  # Belongs to 'default' organization

OpenWISP operator for ABC organization

User.objects.create_user(is_staff=True)
OrganizationUser(is_admin=False, organization=abc_org))

OpenWISP admin for ABC organization

User.objects.create_user(is_staff=True)
OrganizationUser(is_admin=True, organization=abc_org))

@nemesifier
Copy link
Member Author

nemesifier commented Apr 17, 2020

Thank you Pablo, a few clarifications below.

OpenWISP user

User.objects.create_user() # Belongs to 'default' organization

I don't think a user created this way will belong to the default org, it will not belong to any org.

OpenWISP operator

User.objects.create_user(is_staff=True)
OrganizationUser(is_admin=False))  # Belongs to 'default' organization

Should be something like:

operator_group = Group.objects.get ... # query to get the operator group
user.groups.add(operator_group)
OrganizationUser.objects.create(is_admin=True, user=user, organization=organization)

Needs is_admin=True.

is_admin=False is used for end users, for example, a public wifi user which signs up via openwisp-radius. Or any other use case in which there are end-users which are just consumers and not managers of the network.

OpenWISP operator for ABC organization

User.objects.create_user(is_staff=True)
OrganizationUser(is_admin=False, organization=abc_org))

Same here.

OpenWISP admin for ABC organization

User.objects.create_user(is_staff=True)
OrganizationUser(is_admin=True, organization=abc_org))

the Administrator group needs to be assigned, the user must be passed to OrganizationUser.

@nemesifier nemesifier changed the title [Permissions] Explain default groups [Permissions] Explain default permission groups (Admnistrator and Operator) Oct 8, 2021
@nemesifier
Copy link
Member Author

We have some basic information about this in the openwisp-users module README.
While working on openwisp/openwisp-docs#107 we will look to include that here.

@nemesifier
Copy link
Member Author

Now that we're finally moving forward with openwisp/openwisp-docs#107 I am moving this issue to the openwisp-users module, I will add the explanation there.

@nemesifier nemesifier transferred this issue from openwisp/openwisp-docs May 28, 2024
@nemesifier nemesifier changed the title [Permissions] Explain default permission groups (Admnistrator and Operator) [docs] Explain default permission groups (Admnistrator and Operator) May 28, 2024
nemesifier added a commit that referenced this issue Jun 4, 2024
@nemesifier
Copy link
Member Author

2d79d17 in #381 will close this issue. To anyone interested, feel free to review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
OpenWISP Contributor's Board
  
To do (documentation)
Roadmap
  
To do (docs)
Development

No branches or pull requests

2 participants