cancel
Showing results for 
Search instead for 
Did you mean: 

Create Custom Role

sandroh
Champ in-the-making
Champ in-the-making
Where can take a documetation for study the exist permissions groups???
14 REPLIES 14

g_rathod
Star Contributor
Star Contributor
Hi,

I wanna to do same, developing my custom role called  "CustomConsumer" having permission of read and can post topic in discussion (alfresco share)

I tried following in permissionDefinitions.xml


   <!– ***************The Consumer custom role - ******************************************   –>
      <permissionGroup name="CustomConsumer" allowFullControl="false" expose="true" >
          <includePermissionGroup permissionGroup="Read" type="sys:base" />
        <includePermissionGroup permissionGroup="AddChildren" type="fm:topic"/>
      </permissionGroup>

related entry in sitePermissionDefinitions.xml


<!– CustomConsumer role - –>
      <permissionGroup name="SiteCustomConsumer" allowFullControl="false" expose="true" >
         <includePermissionGroup permissionGroup="CustomConsumer" type="cm:cmobject" />
      </permissionGroup>

But I am getting error
14:23:23,734  ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexerComponent' defined in class path resource [alfresco/core-services-context.xml]: Ca
n: Error creating bean with name 'contentService' defined in class path resource [alfresco/content-services-context.xml]: Cannot resolve reference to bean 'nodeService' while se
permissionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionService' defined in class path resource
n: 04270000 There is no permission group :{http://www.alfresco.org/model/forum/1.0}topic AddChildren
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexerAndSearcherFactory' defined in class path resource [alfresco/core-servi
ean with name 'nodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean wit
operty 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionServiceImpl' defined in class path resourc
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'admLuceneIndexerAndSearcherFactory' defined in class path resource [alfresco/c
ualContentService' while setting bean property 'multilingualContentService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean wit
namicAuthorities' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lockOwnerDynamicAuthority' defined in
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentService' defined in class path resource [alfresco/content-services-cont
ference to bean 'permissionService' while setting bean property 'permissionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating
esco.repo.security.permissions.impl.model.PermissionModelException: 04270000 There is no permission group :{http://www.alfresco.org/model/forum/1.0}topic AddChildren
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeService': FactoryBean threw exception on object creation; nested exception
xml]: Cannot resolve reference to bean 'permissionServiceImpl' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mlPropertyInterceptor' defined in class path resource [alfresco/node-services-
eption: Error creating bean with name 'permissionServiceImpl' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'l
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'multilingualContentService' defined in class path resource [alfresco/model-spe
BeanCreationException: Error creating bean with name 'lockOwnerDynamicAuthority' defined in class path resource [alfresco/public-services-security-context.xml]: Invocation of in
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionService' defined in class path resource [alfresco/public-services-se
ssion group :{http://www.alfresco.org/model/forum/1.0}topic AddChildren
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionServiceImpl' defined in class path resource [alfresco/public-service
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lockOwnerDynamicAuthority' defined in class path resource [alfresco/public-ser
Caused by: org.alfresco.repo.security.permissions.impl.model.PermissionModelException: 04270000 There is no permission group :{http://www.alfresco.org/model/forum/1.0}topic AddC
        at org.alfresco.repo.security.permissions.impl.model.PermissionModel.getPermissionGroup(PermissionModel.java:806)


any idea? or what is exact steps to create new role?

g_rathod
Star Contributor
Star Contributor
Hi experts,

Can I create my custom role like following :

Role = CustomConsumer ( Having consumer role plus they can add discussion(forum) topic ) in alfresco share. ??
any idea?

jishnu
Champ in-the-making
Champ in-the-making
Hi everyone,
I'm very new to alfresco. I have a doubt in customizing roles in alfresco. I want to give the following permissions for Contributor role. 1)View, 2)Upload content. I don't want to give permission for downloading & Create sub-folders to that role. In permissionDefenition.xml what i have to do for this ?

Thanks n Regards
Jishnu

mariateresa_pis
Champ in-the-making
Champ in-the-making
Hello everyone.

I am looking for a way to disable the basic authentication that happens automatically for web scripts when they require authentication.

I am developing a custom web application which is backed by a number of web scripts which require an authenticated user. However, rather than relying on the browser-based basic auth mechanism, we prefer to rely on alfresco login which delegates to a web script which takes a username and password explicitly and gives back the alf_ticket that we are using for all subsequent interaction with other web scripts.

My problem is that when a web script is requested with an expired ticket, this leads to a basic authentication prompt in the user's browser. We don't want to use that prompt for authentication due to usability and other concerns; instead, we simply want to detect the 401 (or 403 maybe) indicating that the user is not authenticated, then redirect to the login page, without the nasty browser-based basic authentication popping up.

Any help will be appreciated.
Thanks in advance

gravitonian
Star Collaborator
Star Collaborator
Hi,

Can you validate the ticket in the custom webapp before using it (either before each call or have a script that runs on a timer checking the ticket)? There is an Alfresco Web Script for this:


GET /alfresco/service/api/login/ticket/{ticket}

It returns:
<ul>
<li>STATUS_SUCCESS (200) - if the ticket is valid</li>
<li>STATUS_NOT_FOUND (404) - if the ticket is not valid</li>
<li>STATUS_NOT_FOUND (404) - if the ticket does not belong to the current user</li>
</ul>