-
Notifications
You must be signed in to change notification settings - Fork 1
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
Group managers UI #108
Group managers UI #108
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Sahil590. Looking good. One tweak to the behaviour I think.
{% if request.user.userprofile.is_pi or request.user == member.group_owner %} | ||
| <a href="{% url 'imperial_coldfront_plugin:make_manager' member.pk %}">Make manager</a> | ||
{% endif %} | ||
{% if member.is_manager and request.user.userprofile.is_pi or member.group_owner %} | ||
| <a href="{% url 'imperial_coldfront_plugin:remove_manager' member.pk %}">Remove manager</a> | ||
{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the only logic required here is to hide both of these if is_manager
is true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was overthinking this one too much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also needs to hide the remove button if the member is not manger and the same with the make manager button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that only group owners, managers and superusers can access the view. Managers are the only ones that shouldn't see the links so it should be enough to check that.
76e5e7f
to
100a189
Compare
Description
Added two view functions for adding and removing users, respectively.
I have added a link as the HTML page doesn't look the cleanest, so can change if needed.
Fixes #73 #93 (issue)
Type of change
Key checklist
python -m pytest
)python -m sphinx -b html docs docs/build
)pre-commit run --all-files
)Further checks