Skip to content

wizzdi/flexicore-security-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlexiCore Security Model Build StatusMaven Central

For comprehensive information about FlexiCore Security Model please visit our site.

What it does?

FlexiCore Security Model is a FlexiCore Module and a FlexiCore Entity Plugin. FlexiCore Security Model defines the entities required by FlexiCore Security Service for its multi-tenancy access control support.

How to use as a Module?

Add the flexicore-security-model dependency to your main app using the latest version available from maven central:

        <dependency>
            <groupId>com.wizzdi</groupId>
            <artifactId>flexicore-security-model</artifactId>
            <version>LATEST</version>
        </dependency>

How to use as an Entity Plugin?

Add the flexicore-security-model dependency to your main app using the latest version available from maven central:

        <dependency>
            <groupId>com.wizzdi</groupId>
            <artifactId>flexicore-security-model</artifactId>
            <version>LATEST</version>
            <scope>provided</scope>
        </dependency>

add the flexicore-security-model.jar to your entities folder.

Creating Entities With Data Access Control

you can add a field of type Baseclass to your entity:

@Entity  
public class TestEntity{  
  
   @Id  
  private String id;  
  @ManyToOne(targetEntity = Baseclass.class)  
   private Baseclass security;  
  
  @Id  
  public String getId() {  
      return id;  
  }  
  
   public <T extends TestEntity> T setId(String id) {  
      this.id = id;  
 return (T) this;  
  }  
  
 
  
   @ManyToOne(targetEntity = Baseclass.class)  
   public Baseclass getSecurity() {  
      return security;  
  }  
  
   public <T extends TestEntity> T setSecurity(Baseclass security) {  
      this.security = security;  
 return (T) this;  
  }  
}

or you can directly inherit from Baseclass

@Entity  
public class TestEntity extends Baseclass{  
  
  @ManyToOne(targetEntity = Baseclass.class)  
   private Baseclass security;  
  
   @ManyToOne(targetEntity = Baseclass.class)  
   public Baseclass getSecurity() {  
      return security;  
  }  
  
   public <T extends TestEntity> T setSecurity(Baseclass security) {  
      this.security = security;  
 return (T) this;  
  }  
}

Main Dependencies

FlexiCore Boot

FlexiCore Boot Starter Data JPA

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages