import org.apache.wicket.model.Model;\r
import org.apache.wicket.model.util.CollectionModel;\r
import org.apache.wicket.model.util.ListModel;\r
+import org.slf4j.LoggerFactory;\r
\r
+import com.gitblit.Constants.PermissionType;\r
+import com.gitblit.Constants.RegistrantType;\r
import com.gitblit.GitBlit;\r
import com.gitblit.GitBlitException;\r
import com.gitblit.Keys;\r
-import com.gitblit.Constants.PermissionType;\r
-import com.gitblit.Constants.RegistrantType;\r
import com.gitblit.models.RegistrantAccessPermission;\r
+import com.gitblit.models.RepositoryModel;\r
import com.gitblit.models.TeamModel;\r
import com.gitblit.models.UserModel;\r
import com.gitblit.utils.StringUtils;\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
- boolean isOwner = GitBlit.self().getRepositoryModel(permission.registrant).isOwner(oldName);\r
+ RepositoryModel rm = GitBlit.self().getRepositoryModel(permission.registrant);\r
+ if (rm == null) {\r
+ LoggerFactory.getLogger(getClass()).error("Missing repository " + permission.registrant, new NullPointerException());\r
+ continue;\r
+ }\r
+ boolean isOwner = rm.isOwner(oldName);\r
if (isOwner) {\r
permission.permissionType = PermissionType.OWNER;\r
permission.isEditable = false;\r