mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
Rename general variable name isWritable to hasWritePermission.
This commit is contained in:
@@ -56,6 +56,7 @@ class BasicAuthenticationFilter extends Filter with RepositoryService with Accou
|
||||
private def isWritableUser(username: String, password: String, repository: RepositoryService.RepositoryInfo): Boolean = {
|
||||
getAccountByUserName(username) match {
|
||||
case Some(account) if(account.password == encrypt(password)) => {
|
||||
// TODO Use hasWritePermission?
|
||||
(account.isAdmin // administrator
|
||||
|| account.userName == repository.owner // repository owner
|
||||
|| getCollaborators(repository.owner, repository.name).contains(account.userName)) // collaborator
|
||||
|
||||
Reference in New Issue
Block a user