boolean setUserPermission(String username, int permission) throws IOException {
		synchronized (fileSystem) {
			if (permission < User.READ_ONLY || permission > User.ADMIN) {
				throw new IllegalArgumentException("Invalid permission: " + permission);
			}
			if (mgr.getUserManager().isValidUser(username)) {
				User newUser = new User(username, permission);
				User oldUser = userMap.put(username, newUser);
				writeUserList(userMap, anonymousAccessAllowed);
				if (oldUser != null) {
					log.info("User access to repository '" + name + "' changed: " + newUser);
				}
				else {
					log.info("User access granted to repository '" + name + "': " + newUser);
				}
				return true;
			}
			return false;
		}
	}
Privileged method for setting user access for this repository
@param username user username
@param permission access permission ({@link User#READ_ONLY}, 
{@link User#WRITE}, or {@link User#ADMIN}).
@return true if successful, false if user has not been added to server
@throws IOException failed to update repository access list
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/Repository.java