summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-10-31 23:33:05 -0400
committerJames Moger <james.moger@gitblit.com>2012-10-31 23:33:05 -0400
commit40b07bca7d02438cd0d660f3b1713ffa86f6df76 (patch)
treee53278dcbe303a108acb077f003df54541ceaa43 /src
parent644bdd5a59a5ed5fbf93a0765f92608b0530c16a (diff)
downloadgitblit-40b07bca7d02438cd0d660f3b1713ffa86f6df76.tar.gz
gitblit-40b07bca7d02438cd0d660f3b1713ffa86f6df76.zip
Renamed isEditable to mutable
Diffstat (limited to 'src')
-rw-r--r--src/com/gitblit/GitBlit.java4
-rw-r--r--src/com/gitblit/client/RegistrantPermissionsPanel.java2
-rw-r--r--src/com/gitblit/client/RegistrantPermissionsTableModel.java2
-rw-r--r--src/com/gitblit/client/UsersPanel.java4
-rw-r--r--src/com/gitblit/models/RegistrantAccessPermission.java8
-rw-r--r--src/com/gitblit/models/TeamModel.java4
-rw-r--r--src/com/gitblit/models/UserModel.java4
-rw-r--r--src/com/gitblit/wicket/pages/EditUserPage.java6
-rw-r--r--src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java6
9 files changed, 20 insertions, 20 deletions
diff --git a/src/com/gitblit/GitBlit.java b/src/com/gitblit/GitBlit.java
index a5d8b9e5..eccd7c11 100644
--- a/src/com/gitblit/GitBlit.java
+++ b/src/com/gitblit/GitBlit.java
@@ -692,7 +692,7 @@ public class GitBlit implements ServletContextListener {
public boolean setUserAccessPermissions(RepositoryModel repository, Collection<RegistrantAccessPermission> permissions) {
List<UserModel> users = new ArrayList<UserModel>();
for (RegistrantAccessPermission up : permissions) {
- if (up.isEditable) {
+ if (up.mutable) {
// only set editable defined permissions
UserModel user = userService.getUserModel(up.registrant);
user.setRepositoryPermission(repository.name, up.permission);
@@ -832,7 +832,7 @@ public class GitBlit implements ServletContextListener {
public boolean setTeamAccessPermissions(RepositoryModel repository, Collection<RegistrantAccessPermission> permissions) {
List<TeamModel> teams = new ArrayList<TeamModel>();
for (RegistrantAccessPermission tp : permissions) {
- if (tp.isEditable) {
+ if (tp.mutable) {
// only set explicitly defined access permissions
TeamModel team = userService.getTeamModel(tp.registrant);
team.setRepositoryPermission(repository.name, tp.permission);
diff --git a/src/com/gitblit/client/RegistrantPermissionsPanel.java b/src/com/gitblit/client/RegistrantPermissionsPanel.java
index 8ae23e9a..c28724c7 100644
--- a/src/com/gitblit/client/RegistrantPermissionsPanel.java
+++ b/src/com/gitblit/client/RegistrantPermissionsPanel.java
@@ -133,7 +133,7 @@ public class RegistrantPermissionsPanel extends JPanel {
permissions = new ArrayList<RegistrantAccessPermission>();
}
for (RegistrantAccessPermission rp : permissions) {
- if (rp.isEditable) {
+ if (rp.mutable) {
// only remove editable duplicates
// this allows for specifying an explicit permission
filtered.remove(rp.registrant);
diff --git a/src/com/gitblit/client/RegistrantPermissionsTableModel.java b/src/com/gitblit/client/RegistrantPermissionsTableModel.java
index 1df6bbc2..28d25345 100644
--- a/src/com/gitblit/client/RegistrantPermissionsTableModel.java
+++ b/src/com/gitblit/client/RegistrantPermissionsTableModel.java
@@ -104,7 +104,7 @@ public class RegistrantPermissionsTableModel extends AbstractTableModel {
// and therefore can not be directly manipulated unless the current
// object is the source of the regex (i.e. a user or team with explicit
// regex definition)
- return permissions.get(rowIndex).isEditable;
+ return permissions.get(rowIndex).mutable;
}
return false;
}
diff --git a/src/com/gitblit/client/UsersPanel.java b/src/com/gitblit/client/UsersPanel.java
index 2c1481a4..2c236958 100644
--- a/src/com/gitblit/client/UsersPanel.java
+++ b/src/com/gitblit/client/UsersPanel.java
@@ -316,7 +316,7 @@ public abstract class UsersPanel extends JPanel {
List<RegistrantAccessPermission> permissions = user.getRepositoryPermissions();
for (RegistrantAccessPermission permission : permissions) {
- if (permission.isEditable && PermissionType.EXPLICIT.equals(permission.permissionType)) {
+ if (permission.mutable && PermissionType.EXPLICIT.equals(permission.permissionType)) {
// Ensure this is NOT an owner permission - which is non-editable
// We don't know this from within the usermodel, ownership is a
// property of a repository.
@@ -329,7 +329,7 @@ public abstract class UsersPanel extends JPanel {
boolean isOwner = rm.isOwner(user.username);
if (isOwner) {
permission.permissionType = PermissionType.OWNER;
- permission.isEditable = false;
+ permission.mutable = false;
}
}
}
diff --git a/src/com/gitblit/models/RegistrantAccessPermission.java b/src/com/gitblit/models/RegistrantAccessPermission.java
index 2d0b90b8..0b28d197 100644
--- a/src/com/gitblit/models/RegistrantAccessPermission.java
+++ b/src/com/gitblit/models/RegistrantAccessPermission.java
@@ -35,7 +35,7 @@ public class RegistrantAccessPermission implements Serializable, Comparable<Regi
public AccessPermission permission;
public RegistrantType registrantType;
public PermissionType permissionType;
- public boolean isEditable;
+ public boolean mutable;
public String source;
public RegistrantAccessPermission() {
@@ -44,16 +44,16 @@ public class RegistrantAccessPermission implements Serializable, Comparable<Regi
public RegistrantAccessPermission(RegistrantType registrantType) {
this.registrantType = registrantType;
this.permissionType = PermissionType.EXPLICIT;
- this.isEditable = true;
+ this.mutable = true;
}
- public RegistrantAccessPermission(String registrant, AccessPermission permission, PermissionType permissionType, RegistrantType registrantType, String source, boolean isEditable) {
+ public RegistrantAccessPermission(String registrant, AccessPermission permission, PermissionType permissionType, RegistrantType registrantType, String source, boolean mutable) {
this.registrant = registrant;
this.permission = permission;
this.permissionType = permissionType;
this.registrantType = registrantType;
this.source = source;
- this.isEditable = isEditable;
+ this.mutable = mutable;
}
public boolean isAdmin() {
diff --git a/src/com/gitblit/models/TeamModel.java b/src/com/gitblit/models/TeamModel.java
index acdb0754..2560e5ce 100644
--- a/src/com/gitblit/models/TeamModel.java
+++ b/src/com/gitblit/models/TeamModel.java
@@ -191,7 +191,7 @@ public class TeamModel implements Serializable, Comparable<TeamModel> {
ap.registrant = name;
ap.registrantType = RegistrantType.TEAM;
ap.permission = AccessPermission.NONE;
- ap.isEditable = false;
+ ap.mutable = false;
if (canAdmin) {
ap.permissionType = PermissionType.ADMINISTRATOR;
@@ -205,7 +205,7 @@ public class TeamModel implements Serializable, Comparable<TeamModel> {
if (p != null) {
ap.permissionType = PermissionType.EXPLICIT;
ap.permission = p;
- ap.isEditable = true;
+ ap.mutable = true;
return ap;
}
} else {
diff --git a/src/com/gitblit/models/UserModel.java b/src/com/gitblit/models/UserModel.java
index e81d7ca2..7742d5d9 100644
--- a/src/com/gitblit/models/UserModel.java
+++ b/src/com/gitblit/models/UserModel.java
@@ -252,7 +252,7 @@ public class UserModel implements Principal, Serializable, Comparable<UserModel>
ap.registrant = username;
ap.registrantType = RegistrantType.USER;
ap.permission = AccessPermission.NONE;
- ap.isEditable = false;
+ ap.mutable = false;
// administrator
if (canAdmin()) {
@@ -291,7 +291,7 @@ public class UserModel implements Principal, Serializable, Comparable<UserModel>
if (p != null) {
ap.permissionType = PermissionType.EXPLICIT;
ap.permission = p;
- ap.isEditable = true;
+ ap.mutable = true;
return ap;
}
} else {
diff --git a/src/com/gitblit/wicket/pages/EditUserPage.java b/src/com/gitblit/wicket/pages/EditUserPage.java
index 05aee6dc..45de1bef 100644
--- a/src/com/gitblit/wicket/pages/EditUserPage.java
+++ b/src/com/gitblit/wicket/pages/EditUserPage.java
@@ -107,19 +107,19 @@ public class EditUserPage extends RootSubPage {
final String oldName = userModel.username;
final List<RegistrantAccessPermission> permissions = userModel.getRepositoryPermissions();
for (RegistrantAccessPermission permission : permissions) {
- if (permission.isEditable && PermissionType.EXPLICIT.equals(permission.permissionType)) {
+ if (permission.mutable && PermissionType.EXPLICIT.equals(permission.permissionType)) {
// Ensure this is NOT an owner permission - which is non-editable
// We don't know this from within the usermodel, ownership is a
// property of a repository.
RepositoryModel rm = GitBlit.self().getRepositoryModel(permission.registrant);
if (rm == null) {
- LoggerFactory.getLogger(getClass()).error("Missing repository " + permission.registrant, new NullPointerException());
+ LoggerFactory.getLogger(getClass()).error("Missing repository " + permission.registrant);
continue;
}
boolean isOwner = rm.isOwner(oldName);
if (isOwner) {
permission.permissionType = PermissionType.OWNER;
- permission.isEditable = false;
+ permission.mutable = false;
}
}
}
diff --git a/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java b/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
index d6bd5652..a34ac71f 100644
--- a/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
+++ b/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
@@ -159,9 +159,9 @@ public class RegistrantPermissionsPanel extends BasePanel {
// only allow changing an explicitly defined permission
// this is designed to prevent changing a regex permission in
// a repository
- permissionChoice.setEnabled(entry.isEditable);
+ permissionChoice.setEnabled(entry.mutable);
permissionChoice.setOutputMarkupId(true);
- if (entry.isEditable) {
+ if (entry.mutable) {
permissionChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
private static final long serialVersionUID = 1L;
@@ -181,7 +181,7 @@ public class RegistrantPermissionsPanel extends BasePanel {
// filter out registrants we already have permissions for
final List<String> registrants = new ArrayList<String>(allRegistrants);
for (RegistrantAccessPermission rp : permissions) {
- if (rp.isEditable) {
+ if (rp.mutable) {
// remove editable duplicates
// this allows for specifying an explicit permission
registrants.remove(rp.registrant);