Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
many things for #53
Browse files Browse the repository at this point in the history
- get_user_group(): new method for figuring out what the group object
should be for a user.. Empty group object, single group object , or a
single group object with a sub group for each group the user should be
in (merged group, aka mrgroup_$1,$2,$3) -- if hidden "merged group"
exists, use that. if not, create it.
- update_props_obj: generic object method for updating the properties
(MetadataList of MetadataItems) for ANY object that has properties.
- add_props_obj(): generic object method for setting the properties
object for ANY object that has properties, calls update_props_obj then
sets the return to the attribute on object that holds the properties
- add_props_user(): user object specific method for adding properties
to a user object using add_props_obj()
- create_user(): mid re-vamp:
  - supports deletion of existing user if exists
  - uses new get_user_group() method to determine the "actual" group id
this user should have set on it
  - uses new add_props_user() method to apply any properties supplied
for this user
  - WIP: uses new add_user_roles() method for adding content set role
names for this user

- obj_in_objlist(): checks if object is in object list. special wrapper
method for taniumpy methods and how they work. converts each object to
json (both object and all objects in objlist) and does a string
comparison of object in json form and objects in object list in json
form to return exists = True/False. can throw a duplication error if
dup_error = True and obj is in objlist.
- find_role_match(): looks for matching role supplied in all content
set roles based on attribute supplied (name/id/etc)
- find_roles(): will find all matching role names in supplied list of
role names. if int or str, will use find_role_match() with either 'id'
or 'name' as attribute and add the matches to the return. if
ContentSetRole will just add that to the return. if ContentSetRoleList,
will add each item in that to the return.
- check_type(): utility method for checking if an object is one of a
number of types (needs to be moved into argtools)
- get_user_obj(): utility method for getting a user object. if a User
object is supplied, returns that. if a string is supplied, gets user by
name, returns that. if an integer is supplied, gets user by id, returns
that.
- argget(): fancy footwork utility method for getting the type of list
object of supplied string from contstants.GET_OBJ_MAP
- WIP: mod_roles_user(): Modify (add or remove) content set roles to
user
- WIP: user_role_memberships(): return 2 content set role lists. one of
all the content set roles assigned to this user, another with all of
the content set roles NOT assigned to this user.
- WIP: add_user_role_membership(): Assign a content set role to a user
by creating a content set role membership
- _find(): modified to have better log messages/error checking
  • Loading branch information
Jim Olsen committed Apr 27, 2018
1 parent 3f5e15e commit 96b5f02
Showing 1 changed file with 562 additions and 38 deletions.
Loading

0 comments on commit 96b5f02

Please sign in to comment.