Skip to content

Commit

Permalink
Add read permission when assigning a menu to a new group
Browse files Browse the repository at this point in the history
  • Loading branch information
car031 committed Jul 25, 2024
1 parent cfc5704 commit eb2d9e2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.smartgwt.client.types.ListGridEditEvent;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
Expand Down Expand Up @@ -102,7 +101,7 @@ private HLayout prepareButtons() {

Button save = new Button(I18N.message("applyrights"));
save.setAutoFit(true);
save.addClickHandler((ClickEvent event) -> onSave());
save.addClickHandler(click -> onSave());
if (withSaveButton)
buttons.addMember(save);

Expand Down Expand Up @@ -153,7 +152,7 @@ private void addGroupSelector(HLayout buttons) {
groupForm.setItems(group);
buttons.addMember(groupForm);

group.addChangedHandler((ChangedEvent event) -> {
group.addChangedHandler(changed -> {
ListGridRecord selectedRecord = group.getSelectedRecord();
if (selectedRecord == null)
return;
Expand All @@ -173,7 +172,7 @@ private void addGroupSelector(HLayout buttons) {
rec.setAttribute(ENTITY_ID, selectedRecord.getAttribute("id"));
rec.setAttribute(ENTITY, selectedRecord.getAttribute("name"));
rec.setAttribute(AVATAR, "group");
rec.setAttribute(READ, selectedRecord.getAttribute(READ));
rec.setAttribute(READ, true);
aclGrid.addData(rec);
group.clearValue();
});
Expand Down

0 comments on commit eb2d9e2

Please sign in to comment.