Hi i want to make usable the "repository" page only for the member of my own customize authentication.
Here my use case with the file i modified on the share webapp with my own extension module:
// ============================
// SHARE AMP
//===============================
//--------------------------------------------------------------------------------------------------
// /src/main/resources/alfresco/web-extension/share-config-custom.xml
//--------------------------------------------------------------------------------------------------
<alfresco-config>
<config evaluator="string-compare" condition="WebFramework">
<web-framework>
<defaults>
<page-type>
<id>page.repository</id>
<page-instance-id>repository</page-instance-id>
</page-type>
</defaults>
</web-framework>
</config>
</alfresco-config>
//--------------------------------------------------------------------------------------------------
// /src/main/resources/alfresco/web-extension/site-data/pages/repository.xml
//--------------------------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<page>
<title>Repository Browser</title>
<title-id>page.repository.title</title-id>
<description>Browse content across the whole Repository</description>
<description-id>page.repository.description</description-id>
<template-instance>repository</template-instance>
<!--<authentication>user</authentication>-->
<authentication>admin</authentication>
</page>
How you can see it' very simple i just changed the authorization level of the "repository" page from "user" to "admin", now i want to change again from "admin" to "myOwnAuthentication" like this:
//--------------------------------------------------------------------------------------------------
// /src/main/resources/alfresco/web-extension/site-data/pages/repository.xml
//--------------------------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<page>
<title>Repository Browser</title>
<title-id>page.repository.title</title-id>
<description>Browse content across the whole Repository</description>
<description-id>page.repository.description</description-id>
<template-instance>repository</template-instance>
<!-- MOD ABD -->
<!--<authentication>user</authentication>-->
<!-- END MOD ABD -->
<!-- <authentication>admin</authentication> -->
<authentication>myOwnAuthentication</authentication>
</page>
My question is how can i develop this new "Authentication Family" " (sorry i don't know how to call it) , by name "myOwnAuthentication" and add to my share webapp ?
Solved! Go to Solution.
There is no way to develop / add a custom "authentication family". The values for the authentication element are defined by an enum in Java code, and as such cannot be extended / added to without patching the corresponding classes of the Surf framework. Also bear in mind that the definition of authentication on the web script descriptor does not denote any special authentication method, but only the level of user that is allowed to access the page. If you need more fine grained access control, e.g. require a very specific set of permissions in the Repository backend, you can still do your custom check in your template / web script controller JavaScript and stop / report back an unauthorised access if the user is not allowed to access the page. Alfresco already does the same thing for Sites, e.g. they check that in a controller script, not via authentication.
There is no way to develop / add a custom "authentication family". The values for the authentication element are defined by an enum in Java code, and as such cannot be extended / added to without patching the corresponding classes of the Surf framework. Also bear in mind that the definition of authentication on the web script descriptor does not denote any special authentication method, but only the level of user that is allowed to access the page. If you need more fine grained access control, e.g. require a very specific set of permissions in the Repository backend, you can still do your custom check in your template / web script controller JavaScript and stop / report back an unauthorised access if the user is not allowed to access the page. Alfresco already does the same thing for Sites, e.g. they check that in a controller script, not via authentication.
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.