mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
bringing the pseudo immutability back.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23308 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
fdba356ffd
commit
3cd35cf8e4
1 file changed
+5
-7
@@ -59,6 +59,9 @@ import javax.servlet.ServletException;
|
||||
|
||||
/**
|
||||
* {@link JobProperty} to associate ACL for each project.
|
||||
*
|
||||
* <p>
|
||||
* Once created (and initialized), this object becomes immutable.
|
||||
*/
|
||||
public class AuthorizationMatrixProperty extends JobProperty<Job<?, ?>> {
|
||||
|
||||
@@ -70,10 +73,6 @@ public class AuthorizationMatrixProperty extends JobProperty<Job<?, ?>> {
|
||||
return useProjectSecurity;
|
||||
}
|
||||
|
||||
protected void setUseProjectSecurity(boolean useProjectSecurity) {
|
||||
this.useProjectSecurity = useProjectSecurity;
|
||||
}
|
||||
|
||||
/**
|
||||
* List up all permissions that are granted.
|
||||
*
|
||||
@@ -126,7 +125,7 @@ public class AuthorizationMatrixProperty extends JobProperty<Job<?, ?>> {
|
||||
formData = formData.getJSONObject("useProjectSecurity");
|
||||
|
||||
if(!formData.isNullObject()) {
|
||||
amp.setUseProjectSecurity(true);
|
||||
amp.useProjectSecurity = true;
|
||||
for (Map.Entry<String, Object> r : (Set<Map.Entry<String, Object>>) formData.getJSONObject("data").entrySet()) {
|
||||
String sid = r.getKey();
|
||||
if (r.getValue() instanceof JSONObject) {
|
||||
@@ -251,8 +250,7 @@ public class AuthorizationMatrixProperty extends JobProperty<Job<?, ?>> {
|
||||
String prop = reader.peekNextChild();
|
||||
if (prop!=null && prop.equals("useProjectSecurity")) {
|
||||
reader.moveDown();
|
||||
Boolean useSecurity = (Boolean) context.convertAnother(as, Boolean.class);
|
||||
as.setUseProjectSecurity(useSecurity);
|
||||
as.useProjectSecurity = (Boolean) context.convertAnother(as, Boolean.class);
|
||||
reader.moveUp();
|
||||
}
|
||||
while (reader.hasMoreChildren()) {
|
||||
|
||||
Reference in new issue
Block a user