Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.11] Fix #3894 Too much and unexplained "Inherited from hierarchy" permissions on ImportRun #3952

Merged
merged 1 commit into from
Oct 16, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions molgenis-core-ui/src/main/resources/js/permissionmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@
items.push('<td><input type="radio" name="radio-' + entityId + '" value="none" checked></td>');
items.push('</tr>');
}
if(data.hierarchyPermissionMap && data.hierarchyPermissionMap[entityId.toLowerCase()]) {
$.each(data.hierarchyPermissionMap[entityId.toLowerCase()], function(idx, perm) {
items.push('<tr>');
items.push('<td><span class="muted inherited-permission">inherited from hierarchy</span></td>');
items.push('<td><input type="radio"' + (perm.type === "write" ? ' checked' : '') + ' disabled></td>');
items.push('<td><input type="radio"' + (perm.type === "read" ? ' checked' : '') + ' disabled></td>');
items.push('<td><input type="radio"' + (perm.type === "count" ? ' checked' : '') + ' disabled></td>');
items.push('<td><input type="radio"' + (perm.type ? '' : ' checked') + ' disabled></td>');
items.push('</tr>');
});
}
if(data.groupPermissionMap && data.groupPermissionMap[entityId.toLowerCase()]) {
$.each(data.groupPermissionMap[entityId.toLowerCase()], function(idx, perm) {
items.push('<tr>');
Expand Down Expand Up @@ -106,6 +117,12 @@
success : function(data) {
$('#plugin-container .alert').remove();
$('#plugin-container').prepend('<div class="alert alert-success"><button type="button" class="close" data-dismiss="alert">&times;</button><strong>Success!</strong> Updated plugin permissions</div>');

//Refresh
$('#plugin-group-select').change();
$('#entity-class-group-select').change();
$('#plugin-user-select').change();
$('#entity-class-user-select').change();
},
error: function (xhr, textStatus, errorThrown) {
var errorMessage = JSON.parse(xhr.responseText).errorMessage;
Expand Down