org.springframework.security.acls.model.PermissionGrantingStrategy Java Examples

The following examples show how to use org.springframework.security.acls.model.PermissionGrantingStrategy. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AclRecord.java    From kylin-on-parquet-v2 with Apache License 2.0 6 votes vote down vote up
public void init(Acl parentAcl, PermissionFactory aclPermissionFactory,
        PermissionGrantingStrategy permissionGrantingStrategy) {
    this.aclPermissionFactory = aclPermissionFactory;
    this.permissionGrantingStrategy = permissionGrantingStrategy;
    this.parentAcl = parentAcl;

    if (entries == null)
        entries = new ArrayList<>();

    // convert legacy ace
    if (legacyAceInfo != null) {
        for (LegacyAceInfo legacy : legacyAceInfo.values()) {
            entries.add(new AceImpl(legacy));
        }
        Collections.sort(entries, AceImpl.SID_ORDER);
        legacyAceInfo = null;
    }

    for (int i = 0; i < entries.size(); i++) {
        entries.get(i).init(this, i);
    }
}
 
Example #2
Source File: AclRecord.java    From kylin with Apache License 2.0 6 votes vote down vote up
public void init(Acl parentAcl, PermissionFactory aclPermissionFactory,
        PermissionGrantingStrategy permissionGrantingStrategy) {
    this.aclPermissionFactory = aclPermissionFactory;
    this.permissionGrantingStrategy = permissionGrantingStrategy;
    this.parentAcl = parentAcl;

    if (entries == null)
        entries = new ArrayList<>();

    // convert legacy ace
    if (legacyAceInfo != null) {
        for (LegacyAceInfo legacy : legacyAceInfo.values()) {
            entries.add(new AceImpl(legacy));
        }
        Collections.sort(entries, AceImpl.SID_ORDER);
        legacyAceInfo = null;
    }

    for (int i = 0; i < entries.size(); i++) {
        entries.get(i).init(this, i);
    }
}
 
Example #3
Source File: SecurityConfiguration.java    From haven-platform with Apache License 2.0 5 votes vote down vote up
@Bean
ConfigurableAclService configurableAclService(PermissionGrantingStrategy permissionGrantingStrategy) {
    ConfigurableAclService.Builder b = ConfigurableAclService.builder();
    if(configurers != null) {
        for(AclServiceConfigurer configurer: configurers) {
            configurer.configure(b);
        }
    }
    return b.permissionGrantingStrategy(permissionGrantingStrategy).build();
}
 
Example #4
Source File: SecurityConfiguration.java    From haven-platform with Apache License 2.0 5 votes vote down vote up
@Primary
@Bean
AclService providersAclService(PermissionGrantingStrategy permissionGrantingStrategy) {
    ProvidersAclService service = new ProvidersAclService(permissionGrantingStrategy);
    if(providers != null) {
        service.getProviders().putAll(providers);
    }
    return service;
}
 
Example #5
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example #6
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example #7
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example #8
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example #9
Source File: AclConfig.java    From Spring-Security-Third-Edition with MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example #10
Source File: AclConfig.java    From molgenis with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy() {
  return new BitMaskPermissionGrantingStrategy(auditLogger());
}
 
Example #11
Source File: ACLContext.java    From tutorials with MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy() {
    return new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger());
}