As only admin able to manage user group, I am wondering if I can create a rest end point in scriptrunner, which allow project admin to manage user group by using an generic admin ID and password.
Daniel,
I have script as below,
import com.atlassian.jira.component.ComponentAccessor
def uu = ComponentAccessor.getUserUtil()
def user = uu.getUserByName("boris.georgiev")
def group = uu.getGroupObject("jira-developers")
uu.addUserToGroup(group, user.getDirectoryUser())
but got error, Could you help me take a look?
Qi, I cannot help you if I don't know what the error is.
Please provide me with the exception that you are getting and I'll look into it.
Cheers
Dyelamos
Take a look at this.
You can get that component by:
ComponentAccessor.getGroupManager()
Hope this helps.
Cheers!
Dyelamos
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.