hello

I would like to ask a question regarding a problem that I run into. I have a
script that creates a new site of a certain type. The idea is that it is
easy for one of our programs to get a standard template site, with some
theming options. So I create a default site in the 'website' workspace, and
a site definition in the config directory, and some other things.
Then i add permisson to the newly created site with the following code:

void createACLs(String editorsSecurityRoleName, String siteName) {
    Role securityRole =
getSecuritySupport().getRoleManager().getRole(editorsSecurityRoleName)
    //website permission (/sitename)
    setPermission(securityRole, 'website', "/${siteName}")

    //jumpers permission
(/modules/vpro-jumpers/virtualURIMapping/[sitename])
    setPermission(securityRole, 'config',
"/modules/vpro-jumpers/virtualURIMapping/${siteName}")

    //dms permission (/sitename)
    setPermission(securityRole, 'dms', "/${siteName}")

    //media permission (/sitename)
    setPermission(securityRole, 'media', "/${siteName}")

    scriptLogger.info "Alle benodigde acl's zijn aangemaakt"
}

private void setPermission(Role role, String workspace, String path) {
    role.addPermission(workspace, path, MgnlRole.PERMISSION_ANY)
}

Seems pretty straight forward. But the new permissions are not active yet.
Now i have to open the role editor in the admin central, and save it. Then
the new rules are active. So I suppose It is necessary to flush the rule
system, but I don't know how.

Could anybody tell me this? it would be most helpful..

regards,

-- 
Ernst Bunders
Ontwikkelaar VPRO


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to