diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-07-03 14:18:03 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2012-07-11 16:33:10 +0200 |
commit | 14ac2193fec38b6f87dcf04b0c365d01805b0cae (patch) | |
tree | dd00cc17c4f242495930ba65267d00b2a25dd673 /install/ui/details.js | |
parent | 7e606b01d5b40c90a83b03a790d34ff3bd8dc94e (diff) | |
download | freeipa-14ac2193fec38b6f87dcf04b0c365d01805b0cae.tar.gz freeipa-14ac2193fec38b6f87dcf04b0c365d01805b0cae.tar.xz freeipa-14ac2193fec38b6f87dcf04b0c365d01805b0cae.zip |
Add and remove dns per-domain permission in Web UI
This patch adds support for new per-domain permissions to Web UI.
User with assigned permission (through role,priviledge) can edit DNS zone. These permissions can be added/remove by ipa dnszone-{add/remove}permission $dnszone command.
For adding/removing of this permission in Web UI new actions in DNS zone action list were created. DNS zone object doesn't contain information about existance of related permission. Such information is required for enabling/disabling of new actions. Web UI has to search for the permission to get it. DNS zone facet was modified to use batch command, in a same way as user facet, for loading dnszone and the permission at the same time - on load.
Batch command has a feature to report all errors. Such behavior is unwanted because we expect that permission-show command will fail when the permission doesn't exist. Batch command was therefore modified to not report commands which has retry attribute set to false. This attr was chosen because it has similar purpose in single command execution.
New actions should be enabled only for users with appropriate rights. It is not possible to obtain rights for certain action in advance so an approximation is used: write right for dns zones' managedby attribute.
https://fedorahosted.org/freeipa/ticket/2851
Diffstat (limited to 'install/ui/details.js')
-rw-r--r-- | install/ui/details.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/install/ui/details.js b/install/ui/details.js index 618d02f57..176e7883e 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -996,7 +996,9 @@ IPA.acl_state_evaluator = function(spec) { rights = record.attributelevelrights[that.attribute]; } - rights = rights || ''; + // Full rights if we don't know the rights. Better to allow action and + // then to show error dialog than not be able to do something. + rights = rights || 'rscwo'; for (i=0; i<rights.length; i++) { state = that.attribute + '_' + rights.charAt(i); |