Tom Joseph | bf21cfa | 2018-08-20 19:13:39 +0530 | [diff] [blame^] | 1 | description: > |
| 2 | Implement this interface to set the privilege of the user based on the |
| 3 | group name. The users in the group will inherit the privilege mapping of |
| 4 | the group. The Create method on success creates the object which implements |
| 5 | xyz.openbmc_project.User.PrivilegeMapperEntry. For example in the case of |
| 6 | LDAP, the object path will be /xyz/openbmc_project/user/ldap/<GroupName>. |
| 7 | If the privilege mapping already exists then it throws the exception |
| 8 | xyz.openbmc_project.User.Common.Error.PrivilegeMappingExists. To modify the |
| 9 | privilege for a mapping which already exists, the Privilege property in the |
| 10 | xyz.openbmc_project.User.PrivilegeMapperEntry interface needs to be set. |
| 11 | |
| 12 | methods: |
| 13 | - name: Create |
| 14 | description: > |
| 15 | Creates a mapping for the group to the privilege. |
| 16 | parameters: |
| 17 | - name: GroupName |
| 18 | type: string |
| 19 | description: > |
| 20 | Group Name to which the privilege is to be assigned. In the case |
| 21 | of LDAP, the GroupName will be the LDAP group the user is part |
| 22 | of. |
| 23 | - name: Privilege |
| 24 | type: string |
| 25 | description: > |
| 26 | The privilege associated with the group. The set of available |
| 27 | privileges are xyz.openbmc_project.User.Manager.AllPrivileges. |
| 28 | xyz.openbmc_project.Common.Error.InvalidArgument exception will |
| 29 | be thrown if the privilege is invalid. Additional documentation |
| 30 | on privilege is available here. |
| 31 | https://github.com/openbmc/docs/blob/master/user_management.md |
| 32 | returns: |
| 33 | - name: Path |
| 34 | type: string |
| 35 | description: > |
| 36 | The path for the created privilege mapping object. |
| 37 | |
| 38 | errors: |
| 39 | - xyz.openbmc_project.Common.Error.InternalFailure |
| 40 | - xyz.openbmc_project.Common.Error.InvalidArgument |
| 41 | - xyz.openbmc_project.User.Common.Error.PrivilegeMappingExists |