Config Resources: Makes permission names publicly available

This commit is contained in:
Johannes Schnatterer
2018-08-02 14:16:26 +02:00
parent 988dfbd689
commit 62087521be
4 changed files with 16 additions and 7 deletions

View File

@@ -48,7 +48,10 @@ import javax.xml.bind.annotation.XmlTransient;
@XmlRootElement(name = "config")
@XmlAccessorType(XmlAccessType.FIELD)
public class GitConfig extends RepositoryConfig {
@SuppressWarnings("WeakerAccess") // This might be needed for permission checking
public static final String PERMISSION = "git";
@XmlElement(name = "gc-expression")
private String gcExpression;
@@ -65,6 +68,6 @@ public class GitConfig extends RepositoryConfig {
@XmlTransient // Only for permission checks, don't serialize to XML
public String getId() {
// Don't change this without migrating SCM permission configuration!
return "git";
return PERMISSION;
}
}