MCPcopy Create free account
hub / github.com/saltstack/salt / get_groups

Method get_groups

salt/auth/__init__.py:202–220  ·  view source on GitHub ↗

Read in a load and return the groups a user is a member of by asking the appropriate provider

(self, load)

Source from the content-addressed store, hash-verified

200 return auth_list
201
202 def get_groups(self, load):
203 """
204 Read in a load and return the groups a user is a member of
205 by asking the appropriate provider
206 """
207 if "eauth" not in load:
208 return False
209 fstr = "{}.groups".format(load["eauth"])
210 if fstr not in self.auth:
211 return False
212 fcall = salt.utils.args.format_call(
213 self.auth[fstr], load, expected_extra_kws=AUTH_INTERNAL_KEYWORDS
214 )
215 try:
216 return self.auth[fstr](*fcall["args"], **fcall["kwargs"])
217 except IndexError:
218 return False
219 except Exception: # pylint: disable=broad-except
220 return None
221
222 def _allow_custom_expire(self, load):
223 """

Callers 3

mk_tokenMethod · 0.95
get_auth_listMethod · 0.95
test_get_groupsFunction · 0.80

Calls 1

formatMethod · 0.80

Tested by 1

test_get_groupsFunction · 0.64