]> source.dussan.org Git - gitblit.git/commitdiff
Renamed isEditable to mutable
authorJames Moger <james.moger@gitblit.com>
Thu, 1 Nov 2012 03:33:05 +0000 (23:33 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 1 Nov 2012 03:33:05 +0000 (23:33 -0400)
src/com/gitblit/GitBlit.java
src/com/gitblit/client/RegistrantPermissionsPanel.java
src/com/gitblit/client/RegistrantPermissionsTableModel.java
src/com/gitblit/client/UsersPanel.java
src/com/gitblit/models/RegistrantAccessPermission.java
src/com/gitblit/models/TeamModel.java
src/com/gitblit/models/UserModel.java
src/com/gitblit/wicket/pages/EditUserPage.java
src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java

index a5d8b9e5c39c6af0894079fc80ba68ec2e9f35d1..eccd7c1115659460405070948a815aba822d8dba 100644 (file)
@@ -692,7 +692,7 @@ public class GitBlit implements ServletContextListener {
        public boolean setUserAccessPermissions(RepositoryModel repository, Collection<RegistrantAccessPermission> permissions) {\r
                List<UserModel> users = new ArrayList<UserModel>();\r
                for (RegistrantAccessPermission up : permissions) {\r
-                       if (up.isEditable) {\r
+                       if (up.mutable) {\r
                                // only set editable defined permissions\r
                                UserModel user = userService.getUserModel(up.registrant);\r
                                user.setRepositoryPermission(repository.name, up.permission);\r
@@ -832,7 +832,7 @@ public class GitBlit implements ServletContextListener {
        public boolean setTeamAccessPermissions(RepositoryModel repository, Collection<RegistrantAccessPermission> permissions) {\r
                List<TeamModel> teams = new ArrayList<TeamModel>();\r
                for (RegistrantAccessPermission tp : permissions) {\r
-                       if (tp.isEditable) {\r
+                       if (tp.mutable) {\r
                                // only set explicitly defined access permissions\r
                                TeamModel team = userService.getTeamModel(tp.registrant);\r
                                team.setRepositoryPermission(repository.name, tp.permission);\r
index 8ae23e9a51b5418fab9a4d922984f1251323c264..c28724c772b33a65ee2398496ba9c1170d2c9fa1 100644 (file)
@@ -133,7 +133,7 @@ public class RegistrantPermissionsPanel extends JPanel {
                        permissions = new ArrayList<RegistrantAccessPermission>();\r
                }\r
                for (RegistrantAccessPermission rp : permissions) {\r
-                       if (rp.isEditable) {\r
+                       if (rp.mutable) {\r
                                // only remove editable duplicates\r
                                // this allows for specifying an explicit permission\r
                                filtered.remove(rp.registrant);\r
index 1df6bbc2644aee98b732e325bbdc0f700113bebb..28d2534557b69c029f7e83d291e958d9923c2a58 100644 (file)
@@ -104,7 +104,7 @@ public class RegistrantPermissionsTableModel extends AbstractTableModel {
                        // and therefore can not be directly manipulated unless the current\r
                        // object is the source of the regex (i.e. a user or team with explicit\r
                        // regex definition)\r
-                       return permissions.get(rowIndex).isEditable;\r
+                       return permissions.get(rowIndex).mutable;\r
                }\r
                return false;\r
        }\r
index 2c1481a478dad773675429c43d73756600042e76..2c236958a3157ef963542a4e99417f74b69c2cb1 100644 (file)
@@ -316,7 +316,7 @@ public abstract class UsersPanel extends JPanel {
                \r
                List<RegistrantAccessPermission> permissions = user.getRepositoryPermissions();\r
                for (RegistrantAccessPermission permission : permissions) {\r
-                       if (permission.isEditable && PermissionType.EXPLICIT.equals(permission.permissionType)) {\r
+                       if (permission.mutable && PermissionType.EXPLICIT.equals(permission.permissionType)) {\r
                                // Ensure this is NOT an owner permission - which is non-editable\r
                                // We don't know this from within the usermodel, ownership is a\r
                                // property of a repository.\r
@@ -329,7 +329,7 @@ public abstract class UsersPanel extends JPanel {
                                boolean isOwner = rm.isOwner(user.username);\r
                                if (isOwner) {\r
                                        permission.permissionType = PermissionType.OWNER;\r
-                                       permission.isEditable = false;\r
+                                       permission.mutable = false;\r
                                }\r
                        }\r
                }\r
index 2d0b90b828a189a4cb5c02fef2543e57c3f864e6..0b28d1974ae9ee63e094e0fe41a3dd2dbcc60836 100644 (file)
@@ -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() {
index acdb07540339d6ddcd6f35e5348a676d109bb1e0..2560e5ce62481eda06dd8644d4de6356efc7e5c1 100644 (file)
@@ -191,7 +191,7 @@ public class TeamModel implements Serializable, Comparable<TeamModel> {
                ap.registrant = name;\r
                ap.registrantType = RegistrantType.TEAM;\r
                ap.permission = AccessPermission.NONE;\r
-               ap.isEditable = false;\r
+               ap.mutable = false;\r
                \r
                if (canAdmin) {\r
                        ap.permissionType = PermissionType.ADMINISTRATOR;\r
@@ -205,7 +205,7 @@ public class TeamModel implements Serializable, Comparable<TeamModel> {
                        if (p != null) {\r
                                ap.permissionType = PermissionType.EXPLICIT;\r
                                ap.permission = p;\r
-                               ap.isEditable = true;\r
+                               ap.mutable = true;\r
                                return ap;\r
                        }\r
                } else {\r
index e81d7ca27fe0facc0c04dd84d25bcf832b8af568..7742d5d98e162d890a18aeedbc8f255ace989d97 100644 (file)
@@ -252,7 +252,7 @@ public class UserModel implements Principal, Serializable, Comparable<UserModel>
                ap.registrant = username;\r
                ap.registrantType = RegistrantType.USER;\r
                ap.permission = AccessPermission.NONE;\r
-               ap.isEditable = false;\r
+               ap.mutable = false;\r
 \r
                // administrator\r
                if (canAdmin()) {\r
@@ -291,7 +291,7 @@ public class UserModel implements Principal, Serializable, Comparable<UserModel>
                        if (p != null) {\r
                                ap.permissionType = PermissionType.EXPLICIT;\r
                                ap.permission = p;\r
-                               ap.isEditable = true;\r
+                               ap.mutable = true;\r
                                return ap;\r
                        }\r
                } else {\r
index 05aee6dc5888b8fba5092c47c5e52a880f3802ae..45de1beff67bf7c649edcb6741de5e6735f84291 100644 (file)
@@ -107,19 +107,19 @@ public class EditUserPage extends RootSubPage {
                final String oldName = userModel.username;\r
                final List<RegistrantAccessPermission> permissions = userModel.getRepositoryPermissions();\r
                for (RegistrantAccessPermission permission : permissions) {\r
-                       if (permission.isEditable && PermissionType.EXPLICIT.equals(permission.permissionType)) {\r
+                       if (permission.mutable && PermissionType.EXPLICIT.equals(permission.permissionType)) {\r
                                // Ensure this is NOT an owner permission - which is non-editable\r
                                // We don't know this from within the usermodel, ownership is a\r
                                // property of a repository.\r
                                RepositoryModel rm = GitBlit.self().getRepositoryModel(permission.registrant);\r
                                if (rm == null) {\r
-                                       LoggerFactory.getLogger(getClass()).error("Missing repository " + permission.registrant, new NullPointerException());\r
+                                       LoggerFactory.getLogger(getClass()).error("Missing repository " + permission.registrant);\r
                                        continue;\r
                                }\r
                                boolean isOwner = rm.isOwner(oldName);\r
                                if (isOwner) {\r
                                        permission.permissionType = PermissionType.OWNER;\r
-                                       permission.isEditable = false;\r
+                                       permission.mutable = false;\r
                                }\r
                        }\r
                }\r
index d6bd56526490bfbce91dfd6d02b36f1af0125bef..a34ac71fa8e380c4103ccae4ba232501012316b6 100644 (file)
@@ -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);