#xPc @ s d d k Td d k l Z l Z l Z d d k l Z l Z l Z d d k l Z d d k l Z d d k l Z l Z e d Z d Z e d d e d e d d e d f Z d Z d e f d YZ e i e d e f d YZ e i e d e f d YZ e i e d e f d YZ e i e d e f d YZ e i e d e f d YZ e i e d e f d YZ e i e d e f d YZ! e i e! d e" f d YZ# e i e# d! S(" i( t *( t apit _t ngettext( t Flagt Strt StrEnum( t context( t errors( t DNt EditableDNs Permissions A permission enables fine-grained delegation of rights. A permission is a human-readable form of a 389-ds Access Control Rule, or instruction (ACI). A permission grants the right to perform a specific task such as adding a user, modifying a group, etc. A permission may not contain other permissions. * A permission grants access to read, write, add or delete. * A privilege combines similar permissions (for example all the permissions needed to add a user). * A role grants a set of privileges to users, groups, hosts or hostgroups. A permission is made up of a number of different parts: 1. The name of the permission. 2. The target of the permission. 3. The rights granted by the permission. Rights define what operations are allowed, and may be one or more of the following: 1. write - write one or more attributes 2. read - read one or more attributes 3. add - add a new entry to the tree 4. delete - delete an existing entry 5. all - all permissions are granted Read permission is granted for most attributes by default so the read permission is not expected to be used very often. Note the distinction between attributes and entries. The permissions are independent, so being able to add a user does not mean that the user will be editable. There are a number of allowed targets: 1. type: a type of object (user, group, etc). 2. memberof: a member of a group or hostgroup 3. filter: an LDAP filter 4. subtree: an LDAP filter specifying part of the LDAP DIT. This is a super-set of the "type" target. 5. targetgroup: grant access to modify a specific group (such as granting the rights to manage group membership) EXAMPLES: Add a permission that grants the creation of users: ipa permission-add --type=user --permissions=add "Add Users" Add a permission that grants the ability to manage group membership: ipa permission-add --attrs=member --permissions=write --type=group "Manage Group Members" u permissiont ipapermissiontypet labels Permission Typet acit ACIc s t f d | D S( s Return a dict that includes entries from `options` that are in `keys` example: >>> filtered = filter_options({'a': 1, 'b': 2, 'c': 3}, ['a', 'c']) >>> filtered == {'a': 1, 'c': 3} True c 3 s4 x- | ]&