Ronald Ten Berge wrote:
> Maybe the following code (that is being used in ACLSDialogControl) will work:
> SecurityConfiguration securityConf =
> AdminInterfaceModule.getInstance().getSecurityConfiguration();
> securityConf.getVisibleRepositories();
Thanks, that led me to ContentRepository.getAllRepositoryNames(), which does
exactly what I was looking for. It allowed me to write this bit of Groovy code
to look for a UUID in all workspaces, which can come in handy from time to time
(mainly when error messages throw you a UUID and you'd like to know in which
workspace it is and what its path is, etc.):
----
import info.magnolia.cms.beans.config.ContentRepository
import info.magnolia.cms.core.Content
import info.magnolia.cms.util.ContentUtil
import info.magnolia.cms.util.DumperUtil
def find(uuid) {
for (workspace in ContentRepository.getAllRepositoryNames()) {
Content content = ContentUtil.getContentByUUID(workspace, uuid)
if (content) {
return "Found UUID '${uuid}' in workspace '${workspace}':
${DumperUtil.dump(content)}"
}
}
return "No content found for UUID '${uuid}'"
}
find 'a9ceabd4-a3a1-4234-9354-0c328407ca77'
----
Nils.
------------------------------------------------------------------------
VPRO www.vpro.nl
------------------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------