Commit Graph

27 Commits

Author SHA1 Message Date
kakwa 05aace0e9d force the groups in flatten roles to be sorted
* sorting the groups helps debuggability and also permits testing
that doesn't rely on python ordering (which is different between 2 and
3).
2019-02-09 17:36:01 +01:00
kakwa 3d6e24eb73 pep8 2019-02-07 20:16:39 +01:00
kakwa 74dc6c5894 various changes to support python3
* changes in urllib imports since quote_plus in urllib with python 2 and
in urllib.parse in python 3
* changes in imports for Sets since set is a native type in python 3 and
doesn't requires an import
* fix in __import__, '-1' level for module path discovery is not supported
anymore, switching to 0 (absolute import only).
2019-02-06 22:32:40 +01:00
kakwa f73d4e37bc more pep8 compliance 2015-07-11 22:03:58 +02:00
kakwa 3712bb85cb many pep8 fixes thanks to pep8ify 2015-07-10 21:06:28 +02:00
kakwa 5e5e7e3c6a implementing displaying roles and standalone groups in modify form 2015-06-19 22:15:37 +02:00
kakwa 01de849204 list of roles and not a uniq role for get_groups 2015-06-18 10:04:20 +02:00
kakwa 9b803008bc adding descriptions for roles 2015-06-11 00:33:14 +02:00
kakwa 556d1f744b implementing a method to get groups to remove
* implement a way to remove roles from a user
  without removing groups of roles the user keeps
2015-06-08 22:50:54 +02:00
kakwa bc85d07921 implementing oriented graph for roles 2015-06-07 13:58:38 +02:00
kakwa e9d4b381f4 create reverse structure to deduce which roles a group belongs 2015-06-07 12:17:15 +02:00
kakwa 247a1fed3a removing trailling spaces 2015-06-06 22:23:21 +02:00
kakwa 46470a0924 copying dictionnary 2015-06-05 00:56:37 +02:00
kakwa d3da5507a6 adding a flatten method in roles 2015-06-05 00:49:13 +02:00
kakwa 1735f5da20 simplify roles configuration (backend groups) 2015-06-04 23:34:31 +02:00
kakwa 1211ab431b add methods for class Roles + unit tests
* adding get_allroles (list all available roles)
* adding get_display_name (get display name of a role)
* add various unit tests
2015-05-17 01:22:53 +02:00
kakwa 0416ebe05b unit test + admin roles fix
* adding various unit tests
* now admin roles are inherited (ex admin-lv2 is admin -> admin-lv3 is admin
* adding an exception when requesting groups for none existant role
2015-05-16 23:52:59 +02:00
kakwa 87820da7d0 implementing various methods:
* get_groups (get_groups of a role)
* is_admin (determine if ldapcherry admin)
* get_backends (get list of role backends)
2015-05-16 20:03:34 +02:00
kakwa 17499c82ae better comments and slight improvement in perf 2015-05-16 19:57:26 +02:00
kakwa ab660ebe96 fix in get_roles 2015-05-16 19:11:52 +02:00
kakwa 3889a441a3 implementing roles resolution from list of groups 2015-05-16 18:44:02 +02:00
kakwa 7524a189fe implementing nesting roles 2015-05-15 01:03:31 +02:00
kakwa d74893d104 fixing typos in role files 2015-05-14 22:10:26 +02:00
kakwa 804e2b7202 adding an exception for failures to open role file 2015-05-12 11:34:28 +02:00
kakwa 4aac712286 handling exception if a role key is duplicated 2015-05-12 01:42:08 +02:00
kakwa e9ff75061d adding loading of the roles yaml file 2015-05-12 01:24:16 +02:00
kakwa 7ec0cb4e74 adding skeleton for most files 2015-04-15 21:13:14 +02:00