- Section rolesSection = new Section(main, SWT.NONE, context);
- new Label(rolesSection, SWT.NONE).setText("Roles:");
- String[] roles = cmsUserManager.getUserRoles(user.getName());
- for (String role : roles) {
- new Label(rolesSection, SWT.NONE).setText(role);
+ // Section rolesSection = new Section(main, SWT.NONE, context);
+ Group rolesSection = new Group(main, SWT.NONE);
+ rolesSection.setText("Roles");
+ rolesSection.setLayoutData(CmsUiUtils.fillWidth());
+ rolesSection.setLayout(new GridLayout());
+ // new Label(rolesSection, SWT.NONE).setText("Roles:");
+ List<String> roles = Arrays.asList(cmsUserManager.getUserRoles(user.getName()));
+ for (String role : availableRoles) {
+ // new Label(rolesSection, SWT.NONE).setText(role);
+ Button radio = new Button(rolesSection, SWT.CHECK);
+ radio.setText(role);
+ if (roles.contains(role))
+ radio.setSelection(true);