Revision b3c3954b src/gr/grnet/pithos/web/client/FolderPermissionsDialog.java
b/src/gr/grnet/pithos/web/client/FolderPermissionsDialog.java | ||
---|---|---|
119 | 119 |
|
120 | 120 |
VerticalPanel permPanel = new VerticalPanel(); |
121 | 121 |
FilePermissionsDialog.Images images = GWT.create(FilePermissionsDialog.Images.class); |
122 |
boolean permsReadonly = folder.getInheritedPermissionsFrom() != null || folder.existChildrenPermissions(); |
|
123 |
permList = new PermissionsList(images, folder.getPermissions(), folder.getOwner(), permsReadonly); |
|
122 |
permList = new PermissionsList(images, folder.getPermissions(), folder.getOwner(), false); |
|
124 | 123 |
permPanel.add(permList); |
125 | 124 |
|
126 |
if (!permsReadonly) { |
|
127 |
HorizontalPanel permButtons = new HorizontalPanel(); |
|
128 |
Button add = new Button("Add Group", new ClickHandler() { |
|
129 |
@Override |
|
130 |
public void onClick(ClickEvent event) { |
|
131 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false); |
|
132 |
dlg.center(); |
|
133 |
} |
|
134 |
}); |
|
135 |
add.addStyleName("button"); |
|
136 |
permButtons.add(add); |
|
137 |
permButtons.setCellHorizontalAlignment(add, HasHorizontalAlignment.ALIGN_CENTER); |
|
138 |
|
|
139 |
Button addUser = new Button("Add User", new ClickHandler() { |
|
140 |
@Override |
|
141 |
public void onClick(ClickEvent event) { |
|
142 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, true); |
|
143 |
dlg.center(); |
|
144 |
} |
|
145 |
}); |
|
146 |
addUser.addStyleName("button"); |
|
147 |
permButtons.add(addUser); |
|
148 |
permButtons.setCellHorizontalAlignment(addUser, HasHorizontalAlignment.ALIGN_CENTER); |
|
149 |
permButtons.setSpacing(8); |
|
150 |
permPanel.add(permButtons); |
|
151 |
} |
|
125 |
HorizontalPanel permButtons = new HorizontalPanel(); |
|
126 |
Button add = new Button("Add Group", new ClickHandler() { |
|
127 |
@Override |
|
128 |
public void onClick(ClickEvent event) { |
|
129 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false); |
|
130 |
dlg.center(); |
|
131 |
} |
|
132 |
}); |
|
133 |
add.addStyleName("button"); |
|
134 |
permButtons.add(add); |
|
135 |
permButtons.setCellHorizontalAlignment(add, HasHorizontalAlignment.ALIGN_CENTER); |
|
136 |
|
|
137 |
Button addUser = new Button("Add User", new ClickHandler() { |
|
138 |
@Override |
|
139 |
public void onClick(ClickEvent event) { |
|
140 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, true); |
|
141 |
dlg.center(); |
|
142 |
} |
|
143 |
}); |
|
144 |
addUser.addStyleName("button"); |
|
145 |
permButtons.add(addUser); |
|
146 |
permButtons.setCellHorizontalAlignment(addUser, HasHorizontalAlignment.ALIGN_CENTER); |
|
147 |
permButtons.setSpacing(8); |
|
148 |
permPanel.add(permButtons); |
|
152 | 149 |
|
153 | 150 |
inner.add(permPanel); |
154 | 151 |
|
Also available in: Unified diff