mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-07-18 19:41:01 -05:00
Fix SetPermissionForUser issue with project and repositorySlug parameters
This commit is contained in:

committed by
Yared Ayalew

parent
b0145373d4
commit
4e308ad21e
@ -9699,11 +9699,13 @@ func (a *DefaultApiService) SetPermissionForGroups_32(localVarOptionals map[stri
|
||||
/* DefaultApiService
|
||||
Promote or demote a user's permission level for the specified repository. Available repository permissions are: <ul> <li>REPO_READ</li> <li>REPO_WRITE</li> <li>REPO_ADMIN</li> </ul> See the <a href=\"https://confluence.atlassian.com/display/BitbucketServer/Using+repository+permissions\">Bitbucket Server documentation</a> for a detailed explanation of what each permission entails. <p> The authenticated user must have <strong>REPO_ADMIN</strong> permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a project or global permission that already implies that permission.
|
||||
* @param ctx context.Context for authentication, logging, tracing, etc.
|
||||
@param "projectKey" (string) name of the project to grant permission to
|
||||
@param "repositorySlug" (string) repository slug
|
||||
@param optional (nil or map[string]interface{}) with one or more of:
|
||||
@param "name" (string) the names of the users
|
||||
@param "permission" (string) the permission to grant
|
||||
@return */
|
||||
func (a *DefaultApiService) SetPermissionForUser(localVarOptionals map[string]interface{}) (*APIResponse, error) {
|
||||
func (a *DefaultApiService) SetPermissionForUser(projectKey string, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error) {
|
||||
var (
|
||||
localVarHTTPMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
@ -9713,6 +9715,8 @@ func (a *DefaultApiService) SetPermissionForUser(localVarOptionals map[string]in
|
||||
|
||||
// create path and map variables
|
||||
localVarPath := a.client.cfg.BasePath + "/api/1.0/projects/{projectKey}/repos/{repositorySlug}/permissions/users"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"projectKey"+"}", fmt.Sprintf("%v", projectKey), -1)
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"repositorySlug"+"}", fmt.Sprintf("%v", repositorySlug), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
|
Reference in New Issue
Block a user