Search in sources :

Example 1 with Permission

use of com.atlassian.stash.user.Permission in project stashbot by palantir.

the class PluginUserManager method addUserToRepoForReading.

public void addUserToRepoForReading(String username, Repository repo) {
    StashUser user = us.getUserByName(username);
    Permission repoRead = Permission.REPO_READ;
    SetPermissionRequest spr = new SetPermissionRequest.Builder().repositoryPermission(repoRead, repo).user(user).build();
    pas.setPermission(spr);
}
Also used : SetPermissionRequest(com.atlassian.stash.user.SetPermissionRequest) StashUser(com.atlassian.stash.user.StashUser) Permission(com.atlassian.stash.user.Permission)

Aggregations

Permission (com.atlassian.stash.user.Permission)1 SetPermissionRequest (com.atlassian.stash.user.SetPermissionRequest)1 StashUser (com.atlassian.stash.user.StashUser)1