Few enhancements
[lgpl/argeo-commons.git] / org.argeo.cms.ui.workbench / src / org / argeo / cms / ui / workbench / internal / useradmin / parts / GroupsView.java
index 580e05150ef5514c660ad131ca298ec5bcfadacf..0d33677ac572da6e018da14fc9556f10af99071e 100644 (file)
@@ -144,7 +144,7 @@ public class GroupsView extends ViewPart implements ArgeoNames {
        private class MyUserTableViewer extends LdifUsersTable {
                private static final long serialVersionUID = 8467999509931900367L;
 
-               private boolean showSystemRoles = false;
+               private boolean showSystemRoles;
 
                private final String[] knownProps = { LdapAttrs.uid.name(),
                                LdapAttrs.cn.name(), LdapAttrs.DN };
@@ -158,6 +158,9 @@ public class GroupsView extends ViewPart implements ArgeoNames {
                        final Button showSystemRoleBtn = new Button(staticFilterCmp,
                                        SWT.CHECK);
                        showSystemRoleBtn.setText("Show system roles");
+                       showSystemRoles = CurrentUser.isInRole(NodeConstants.ROLE_ADMIN);
+                       showSystemRoleBtn.setSelection(showSystemRoles);
+                       
                        showSystemRoleBtn.addSelectionListener(new SelectionAdapter() {
                                private static final long serialVersionUID = -7033424592697691676L;