#NEWLINE# def editgroupmember( self , group_id , user_id , access_level ) : #NEWLINE# #INDENT# 'Edit user access level in a group\n\n        :param group_id: group id\n        :param user_id: user id\n        :param access_level: access level, see gitlab help to know more\n        :return: True if success\n        ' #NEWLINE# if ( not isinstance ( access_level , int ) ) : #NEWLINE# #INDENT# if ( access_level . lower ( ) == 'owner' ) : #NEWLINE# #INDENT# access_level = 50 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( access_level . lower ( ) == 'master' ) : #NEWLINE# #INDENT# access_level = 40 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( access_level . lower ( ) == 'developer' ) : #NEWLINE# #INDENT# access_level = 30 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( access_level . lower ( ) == 'reporter' ) : #NEWLINE# #INDENT# access_level = 20 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( access_level . lower ( ) == 'guest' ) : #NEWLINE# #INDENT# access_level = 10 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# data = { #NEWLINE# #INDENT# 'id' : user_id , #NEWLINE# 'user_id' : user_id , #NEWLINE# 'access_level' : access_level , #NEWLINE# #UNINDENT# } #NEWLINE# request = requests . put ( '{0}/{1}/members/{2}' . format ( self . groups_url , group_id , user_id ) , headers = self . headers , data = data , verify = self . verify_ssl , auth = self . auth , timeout = self . timeout ) #NEWLINE# return ( request . status_code == 200 )