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

ADDED: Export User Permissions (Superuser & Admin) #14614

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

akemidx
Copy link
Collaborator

@akemidx akemidx commented Apr 17, 2024

Description

A new column has been added to the users export. When exporting using the Export button on the users index page, Superusers and Admins will be listed as such.

Screenshot 2024-04-17 at 7 23 02 PM Screenshot 2024-04-17 at 7 23 16 PM

Fixes # SC-19796

Type of change

  • New feature (non-breaking change which adds functionality)

  • I have read the Contributing documentation available here: https://snipe-it.readme.io/docs/contributing-overview

  • I have formatted this PR according to the project guidelines: https://snipe-it.readme.io/docs/contributing-overview#pull-request-guidelines

  • My code follows the style guidelines of this project

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation

  • My changes generate no new warnings

  • I have added tests that prove my fix is effective or that my feature works

  • New and existing unit tests pass locally with my changes

Copy link

what-the-diff bot commented Apr 17, 2024

PR Summary

  • Enhancements in the User Controller
    In UsersController.php, we've introduced a few changes geared towards a smoother user experience. A new variable called $permissionstring has been added to store user permissions in a more readable format.

  • New Translations
    To make the platform more user-friendly, we've added some new translations in UsersController.php such as trans('general.groups') and trans('general.permission_level'). These translations will improve the interface by providing more contextually appropriate language, enhancing the platform's user-friendliness.

  • Improved Access Control
    The $permissionstring variable is included in the values array, which is an important step in determining what permissions different users have, ensuring better access control of the application.

  • Updates to the General Interface
    In general.php, the new translation 'Permission Level' has been added. This translation is an additional step in providing users with a better understanding of their access and permissions within the system.

@snipe
Copy link
Owner

snipe commented Apr 18, 2024

Looks like we have some conflicts here - can you resolve those?

Also, I don't think we specify anything other than admin or superadmin, right? That could be misleading, since it could appear as though the user has no extra privileges even when they might be able to edit/create users, assets, etc. Not sure the best way to handle that issue.

@snipe snipe closed this Apr 18, 2024
@akemidx
Copy link
Collaborator Author

akemidx commented Apr 18, 2024

yes, there are other permissions. We DID tho in our dev meeting on a monday say to start with only admin and superuser.
We can revisit then on Monday.

@uberbrady uberbrady reopened this Apr 22, 2024
@uberbrady
Copy link
Collaborator

Alison says - for people who have at least some privileges - make sure to show something in there. Alison says "*" but I would prefer something like "normal permissions" or something like that?

@akemidx
Copy link
Collaborator Author

akemidx commented Apr 22, 2024

Alison says - for people who have at least some privileges - make sure to show something in there. Alison says "*" but I would prefer something like "normal permissions" or something like that?

We can do this, but for this particular solve, since we are specifically looking for the admin or superuser key value pair, we either can else it, or iterate through all permissions everytime. either way, yea, will do.

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

Successfully merging this pull request may close these issues.

None yet

3 participants