Hi all,
Is it possible to define additional custom site group ? So always when new site is created additional group {site identifier}_SpecialGroup will be also created.
Let's say my requirement is to have one folder in site, where just users with this special role should have access.
I don't want to create it manually always when new site is created.
Thanks
You should create a class like this:
public class SiteCreateEvent implements NodeServicePolicies.OnCreateNodePolicy {
private PolicyComponent policyComponent;
public void init() {
this.policyComponent.bindClassBehaviour(OnCreateNodePolicy.QNAME, SiteModel.TYPE_SITE, new JavaBehaviour(
this, "onCreateNode", NotificationFrequency.TRANSACTION_COMMIT));
}
@Override
public void onCreateNode(ChildAssociationRef childAssocRef) {
// Your code to create the group
}
public void setPolicyComponent(PolicyComponent policyComponent) {
this.policyComponent = policyComponent;
}
}
Thanks I will try
So my custom group will look like: site_{site id}_MyCustomRole and I will add it to group site_{site id}
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.