Search in sources :

Example 1 with EstatioUser

use of org.estatio.module.base.fixtures.security.users.personas.EstatioUser in project estatio by estatio.

the class EstatioBaseModule method getRefDataSetupFixture.

@Override
public FixtureScript getRefDataSetupFixture() {
    if (refData.get()) {
        return null;
    }
    // else
    refData.set(true);
    return new FixtureScript() {

        @Override
        protected void execute(final ExecutionContext executionContext) {
            executionContext.executeChild(this, new TickingClockFixture().setDate("2014-05-18"));
            executionContext.executeChild(this, new ApplicationTenancy_enum.PersistAll());
            // set up 3 estatio roles
            executionContext.executeChild(this, new EstatioRolesAndPermissions());
            // estatio-admin user with the estatio-admin role + superuser
            executionContext.executeChild(this, new EstatioAdmin());
            executionContext.executeChild(this, new EstatioAdmin_Has_EstatioSuperuserRole());
            // bunch of users with estatio-user role
            executionContext.executeChild(this, new EstatioUser());
            executionContext.executeChild(this, new EstatioUserInFrance());
            executionContext.executeChild(this, new EstatioUserInGreatBritain());
            executionContext.executeChild(this, new EstatioUserInItaly());
            executionContext.executeChild(this, new EstatioUserInNetherlands());
            executionContext.executeChild(this, new EstatioUserInSweden());
        }
    };
}
Also used : TickingClockFixture(org.apache.isis.applib.fixturescripts.clock.TickingClockFixture) ApplicationTenancy_enum(org.incode.module.apptenancy.fixtures.enums.ApplicationTenancy_enum) EstatioAdmin_Has_EstatioSuperuserRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_EstatioSuperuserRole) EstatioAdmin(org.estatio.module.base.fixtures.security.users.personas.EstatioAdmin) EstatioUserInSweden(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInSweden) EstatioUserInGreatBritain(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInGreatBritain) EstatioRolesAndPermissions(org.estatio.module.base.fixtures.security.perms.personas.EstatioRolesAndPermissions) FixtureScript(org.apache.isis.applib.fixturescripts.FixtureScript) EstatioUserInNetherlands(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInNetherlands) EstatioUser(org.estatio.module.base.fixtures.security.users.personas.EstatioUser) EstatioUserInFrance(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInFrance) EstatioUserInItaly(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInItaly)

Example 2 with EstatioUser

use of org.estatio.module.base.fixtures.security.users.personas.EstatioUser in project estatio by estatio.

the class EstatioSecurityModuleSeedFixture method execute.

@Override
protected void execute(ExecutionContext executionContext) {
    // security module
    executionContext.executeChild(this, new SeedUsersAndRolesFixtureScript());
    // estatio app tenancy, users, roles etc
    executionContext.executeChild(this, ApplicationTenancy_enum.Global.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.GlobalOnly.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.Fr.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.FrOther.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.It.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.ItOther.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.Nl.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.NlOther.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.Se.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.SeOther.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.Gb.builder());
    executionContext.executeChild(this, ApplicationTenancy_enum.GbOther.builder());
    // perms (role/features)
    executionContext.executeChild(this, new EstatioRolesAndPermissions());
    executionContext.executeChild(this, new EstatioAdmin());
    executionContext.executeChild(this, new EstatioUser());
    executionContext.executeChild(this, new EstatioUserInFrance());
    executionContext.executeChild(this, new EstatioUserInGreatBritain());
    executionContext.executeChild(this, new EstatioUserInItaly());
    executionContext.executeChild(this, new EstatioUserInNetherlands());
    executionContext.executeChild(this, new EstatioUserInSweden());
    executionContext.executeChild(this, new TogglzModuleAdminRole());
    // user/role (users with global app tenancy)
    executionContext.executeChild(this, new EstatioAdmin_Has_EstatioAdminRole());
    executionContext.executeChild(this, new EstatioAdmin_Has_EstatioSuperuserRole());
    executionContext.executeChild(this, new EstatioAdmin_Has_IsisSecurityModuleAdminRole());
    executionContext.executeChild(this, new EstatioAdmin_Has_TogglzAdminRole());
    executionContext.executeChild(this, new EstatioUser_Has_IsisSecurityModuleRegularRole());
    // user/roles (users with country-specific app tenancy)
    executionContext.executeChild(this, new EstatioUserInFrance_Has_IsisSecurityModuleRegularRole());
    executionContext.executeChild(this, new EstatioUserInItaly_Has_IsisSecurityModuleRegularRole());
    executionContext.executeChild(this, new EstatioUserInNetherlands_Has_IsisSecurityModuleRegularRole());
    executionContext.executeChild(this, new EstatioUserInSweden_Has_IsisSecurityModuleRegularRole());
}
Also used : EstatioUserInItaly_Has_IsisSecurityModuleRegularRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioUserInItaly_Has_IsisSecurityModuleRegularRole) EstatioUserInNetherlands_Has_IsisSecurityModuleRegularRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioUserInNetherlands_Has_IsisSecurityModuleRegularRole) EstatioAdmin_Has_EstatioSuperuserRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_EstatioSuperuserRole) EstatioAdmin(org.estatio.module.base.fixtures.security.users.personas.EstatioAdmin) EstatioUserInSweden(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInSweden) EstatioAdmin_Has_IsisSecurityModuleAdminRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_IsisSecurityModuleAdminRole) EstatioUserInFrance_Has_IsisSecurityModuleRegularRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioUserInFrance_Has_IsisSecurityModuleRegularRole) EstatioUserInGreatBritain(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInGreatBritain) EstatioRolesAndPermissions(org.estatio.module.base.fixtures.security.perms.personas.EstatioRolesAndPermissions) EstatioUserInNetherlands(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInNetherlands) EstatioUser(org.estatio.module.base.fixtures.security.users.personas.EstatioUser) EstatioUser_Has_IsisSecurityModuleRegularRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioUser_Has_IsisSecurityModuleRegularRole) TogglzModuleAdminRole(org.isisaddons.module.togglz.glue.seed.TogglzModuleAdminRole) EstatioUserInFrance(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInFrance) EstatioAdmin_Has_TogglzAdminRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_TogglzAdminRole) EstatioUserInSweden_Has_IsisSecurityModuleRegularRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioUserInSweden_Has_IsisSecurityModuleRegularRole) SeedUsersAndRolesFixtureScript(org.isisaddons.module.security.seed.SeedUsersAndRolesFixtureScript) EstatioUserInItaly(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInItaly) EstatioAdmin_Has_EstatioAdminRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_EstatioAdminRole)

Aggregations

EstatioRolesAndPermissions (org.estatio.module.base.fixtures.security.perms.personas.EstatioRolesAndPermissions)2 EstatioAdmin_Has_EstatioSuperuserRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_EstatioSuperuserRole)2 EstatioAdmin (org.estatio.module.base.fixtures.security.users.personas.EstatioAdmin)2 EstatioUser (org.estatio.module.base.fixtures.security.users.personas.EstatioUser)2 EstatioUserInFrance (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInFrance)2 EstatioUserInGreatBritain (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInGreatBritain)2 EstatioUserInItaly (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInItaly)2 EstatioUserInNetherlands (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInNetherlands)2 EstatioUserInSweden (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInSweden)2 FixtureScript (org.apache.isis.applib.fixturescripts.FixtureScript)1 TickingClockFixture (org.apache.isis.applib.fixturescripts.clock.TickingClockFixture)1 EstatioAdmin_Has_EstatioAdminRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_EstatioAdminRole)1 EstatioAdmin_Has_IsisSecurityModuleAdminRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_IsisSecurityModuleAdminRole)1 EstatioAdmin_Has_TogglzAdminRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_TogglzAdminRole)1 EstatioUserInFrance_Has_IsisSecurityModuleRegularRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioUserInFrance_Has_IsisSecurityModuleRegularRole)1 EstatioUserInItaly_Has_IsisSecurityModuleRegularRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioUserInItaly_Has_IsisSecurityModuleRegularRole)1 EstatioUserInNetherlands_Has_IsisSecurityModuleRegularRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioUserInNetherlands_Has_IsisSecurityModuleRegularRole)1 EstatioUserInSweden_Has_IsisSecurityModuleRegularRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioUserInSweden_Has_IsisSecurityModuleRegularRole)1 EstatioUser_Has_IsisSecurityModuleRegularRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioUser_Has_IsisSecurityModuleRegularRole)1 ApplicationTenancy_enum (org.incode.module.apptenancy.fixtures.enums.ApplicationTenancy_enum)1