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

Commit

Permalink
Edits to help commands
Browse files Browse the repository at this point in the history
Making some of the help commands more clear based on customer feedback.
  • Loading branch information
grioghar authored May 16, 2022
1 parent bbf853b commit 3414431
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 @@ -79,10 +79,10 @@ def configure(self, configuration):
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)
"""
arguments = re.sub(ACCESS_REGEX, "\\1", match.string.replace("*", ""))
if re.match("^role (.*)", arguments):
Expand All @@ -101,10 +101,10 @@ def access_resource(self, message, match):
return
yield from self.get_resource_grant_helper().request_access(message, resource_name, flags=flags)

@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 3414431

Please sign in to comment.