use of org.alfresco.service.cmr.dictionary.CustomModelService in project alfresco-remote-api by Alfresco.
the class BaseCustomModelApiTest method setup.
@Before
public void setup() throws Exception {
authenticationService = applicationContext.getBean("authenticationService", MutableAuthenticationService.class);
personService = applicationContext.getBean("personService", PersonService.class);
customModelService = applicationContext.getBean("customModelService", CustomModelService.class);
final AuthorityService authorityService = applicationContext.getBean("authorityService", AuthorityService.class);
this.nonAdminUserName = createUser("nonAdminUser" + System.currentTimeMillis(), "password", null);
this.customModelAdmin = createUser("customModelAdmin" + System.currentTimeMillis(), "password", null);
users.add(nonAdminUserName);
users.add(customModelAdmin);
// Add 'customModelAdmin' user into 'ALFRESCO_MODEL_ADMINISTRATORS' group
transactionHelper.doInTransaction(new RetryingTransactionCallback<Void>() {
@Override
public Void execute() throws Throwable {
authorityService.addAuthority(CustomModelServiceImpl.GROUP_ALFRESCO_MODEL_ADMINISTRATORS_AUTHORITY, customModelAdmin);
return null;
}
});
}
Aggregations