Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #246 from strongdm/grioghar-patch-1
Browse files Browse the repository at this point in the history
Edits to help commands
  • Loading branch information
camposer authored Aug 19, 2022
2 parents e07e5bd + 3414431 commit bebcaeb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/sdm/accessbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ def check_elevate_admin_user(self, msg):
def check_configuration(self, configuration):
pass

@re_botcmd(pattern=ACCESS_REGEX, flags=re.IGNORECASE, prefixed=False, re_cmd_name_help="access to resource-name [--reason text] [--duration duration]")
@re_botcmd(pattern=ACCESS_REGEX, flags=re.IGNORECASE, prefixed=False, re_cmd_name_help="access to <resource-name> [--reason text] [--duration duration]")
def access_resource(self, message, match):
"""
Grant access to a resource (using the requester's email address)
Grant access to <resource-name> (using the requester's email address)
"""
self.__metrics_helper.increment_access_requests()
arguments = re.sub(ACCESS_REGEX, "\\1", match.string.replace("*", ""), flags=re.IGNORECASE)
Expand All @@ -189,10 +189,10 @@ def access_resource(self, message, match):
yield from self.get_resource_grant_helper().request_access(message, resource_name, flags=flags)
self.__metrics_helper.reset_consecutive_errors()

@re_botcmd(pattern=ASSIGN_ROLE_REGEX, flags=re.IGNORECASE, prefixed=False, re_cmd_name_help="access to role role-name")
@re_botcmd(pattern=ASSIGN_ROLE_REGEX, flags=re.IGNORECASE, prefixed=False, re_cmd_name_help="access to role <role-name>")
def assign_role(self, message, match):
"""
Grant access to all resources in a role (using the requester's email address)
Grant access to all resources in <role-name> (using the requester's email address)
"""
if not self._platform.can_assign_role(message):
return
Expand Down

0 comments on commit bebcaeb

Please sign in to comment.