仓库权限只能由仓库的所有者维护(所有者可以是多个用户)。
Mutable:拥有可以通过控制面板更改的权限
Specified:Mutable + 所有者
Effective:Specified +正则表达式,管理员等
Repo permissions can only be maintained by an owner of the repo. If you are not the owner, it will appear to let you change the permissions, but actually fail silently
支持上述说法的代码片段
public class RegistrantPermissionsPanel extends BasePanel {
private static final long serialVersionUID = 1L;
public enum Show {
specified, mutable, effective;
public boolean show(RegistrantAccessPermission ap) {
switch (this) {
case specified:
return ap.mutable || ap.isOwner();
case mutable:
return ap.mutable;
case effective:
return true;
default:
return true;
}
}
}
private Show activeState = Show.mutable;