File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -394,4 +394,49 @@ public function archiveProject(int|string $projectIdOrKey): string
394394
395395 return $ ret ;
396396 }
397+
398+ /**
399+ * Get all the Roles of a Jira Project.
400+ *
401+ * @param int|string $projectIdOrKey
402+ *
403+ * @throws JiraException
404+ *
405+ * @return string
406+ */
407+ public function getRolesOfProject (int |string $ projectIdOrKey ): string
408+ {
409+ return $ this ->exec ($ this ->uri .'/ ' .$ projectIdOrKey .'/role ' , null , 'PUT ' );
410+ }
411+
412+ /**
413+ * Assign a Role to a Project.
414+ *
415+ * @param int|string $projectIdOrKey
416+ * @param int $roleId
417+ *
418+ * @throws JiraException
419+ *
420+ * @return string
421+ */
422+ public function assignRoleToProject (int |string $ projectIdOrKey , int $ roleId ): string
423+ {
424+ return $ this ->exec ($ this ->uri .'/ ' .$ projectIdOrKey .'/role/ ' .$ roleId , null , 'PUT ' );
425+ }
426+
427+ /**
428+ * Add Role Actor to a Project Role.
429+ *
430+ * @param int|string $projectIdOrKey
431+ * @param int $roleId
432+ * @param string $actor
433+ *
434+ * @throws JiraException
435+ *
436+ * @return string
437+ */
438+ public function addProjectRoleActors (int |string $ projectIdOrKey , int $ roleId , string $ actor ): string
439+ {
440+ return $ this ->exec ($ this ->uri .'/ ' .$ projectIdOrKey .'/role/ ' .$ roleId , $ actor , 'POST ' );
441+ }
397442}
You can’t perform that action at this time.
0 commit comments