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

The following examples show how to use org.springframework.security.acls.model.PermissionGrantingStrategy. These examples are extracted from open source projects. 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 Project: kylin-on-parquet-v2   Source File: AclRecord.java    License: 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 Project: kylin   Source File: AclRecord.java    License: 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 Project: haven-platform   Source File: SecurityConfiguration.java    License: 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 Project: haven-platform   Source File: SecurityConfiguration.java    License: 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 Project: Spring-Security-Third-Edition   Source File: AclConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example 6
Source Project: Spring-Security-Third-Edition   Source File: AclConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example 7
Source Project: Spring-Security-Third-Edition   Source File: AclConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example 8
Source Project: Spring-Security-Third-Edition   Source File: AclConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example 9
Source Project: Spring-Security-Third-Edition   Source File: AclConfig.java    License: MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy(){
    return new DefaultPermissionGrantingStrategy(consoleAuditLogger());
}
 
Example 10
Source Project: molgenis   Source File: AclConfig.java    License: GNU Lesser General Public License v3.0 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy() {
  return new BitMaskPermissionGrantingStrategy(auditLogger());
}
 
Example 11
Source Project: tutorials   Source File: ACLContext.java    License: MIT License 4 votes vote down vote up
@Bean
public PermissionGrantingStrategy permissionGrantingStrategy() {
    return new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger());
}