Commit 61a1d1fc authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fixed radio buttons conditioning to not allow admins change their own permissions

parent d2f5ee21
......@@ -11,24 +11,17 @@
.form-group
= f.label :access_level, class: 'control-label'
.col-sm-10
= f.radio_button :access_level, :regular, checked: true
= f.radio_button :access_level, :regular, disabled: (current_user == @user && @user.is_admin?)
= label_tag :regular do
Regular
%p.light
Regular users have access to their groups and projects
- if license_allows_auditor_user?
= f.radio_button :access_level, :auditor
= f.radio_button :access_level, :auditor, disabled: (current_user == @user && @user.is_admin?)
= label_tag :auditor do
Auditor
%p.light
Auditors have read-only access to all groups, projects and users
- if current_user == @user
= f.radio_button :access_level, :admin
= label_tag :admin do
Admin
%p.light
You cannot remove your own admin rights
- else
= f.radio_button :access_level, :admin
= label_tag :admin do
Admin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment