Rename general variable name isWritable to hasWritePermission.

This commit is contained in:
takezoe
2013-07-03 01:51:41 +09:00
parent 14187795fb
commit 0bda8cdab7
9 changed files with 20 additions and 16 deletions

View File

@@ -183,7 +183,7 @@ trait RepositoryService { self: AccountService =>
def getCollaborators(userName: String, repositoryName: String): List[String] =
Query(Collaborators).filter(_.byRepository(userName, repositoryName)).sortBy(_.collaboratorName).list.map(_.collaboratorName)
def isWritable(owner: String, repository: String, loginAccount: Option[Account]): Boolean = {
def hasWritePermission(owner: String, repository: String, loginAccount: Option[Account]): Boolean = {
loginAccount match {
case Some(a) if(a.isAdmin) => true
case Some(a) if(a.userName == owner) => true