cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] Problem : Create a new role

emmanuel
Champ in-the-making
Champ in-the-making
Hi everybody,

I'm working on the alfresco project for my company, and it seems to be very powerful. But, however , I got some trouble … Let me explain:

I want to have a workflow (not very difficult, for this step  :wink: )
So I have 3 folders:
  => "Drafts
  => "Pending approval"
  => "Published"

So, I have 3 groups:
  => "Writers"
  => "Approvers"
  => "Administrators"

Indeed, I want the writers to request an approval for a document, but not TO BE ABLE OF VIEWING THE FOLDER "Pending approval".

That's my problem, it seems that there is no solution except creating a new role. So, I decided to create a role, in order to write in a folder where the user cannot read.

In the permissionsDefinition.xml, i had the following:


<!– Rajout d'une permission permettant l'ajout de documents dans un dossier sur lequel, l'utilisateur n'a pas de droit de lecture –>
      <permissionGroup name="Redacteur" allowFullControl="false" expose="true">
    <!– <includePermissionGroup permissionGroup="Read" type="sys:base" /> –>
     <includePermissionGroup permissionGroup="AddChildren" type="sys:base" />
     <includePermissionGroup permissionGroup="Write" type="sys:base" />
     <includePermissionGroup permissionGroup="CheckOut" type="cm:lockable" />
      </permissionGroup>

But, it still doesn't work! I don't wee where I could have done a mistake!

If someone has a solution, I hope for a lot of help  :cry:

P.S: I have already tried to create a "temp" folder, where i created a copy rule, but it doesn't work too…

Thanks.
40 REPLIES 40

rcortesr
Star Contributor
Star Contributor
Hi,

What does your rule do?

Thanks,

–Aladdin
Hi,

my rule moves a document when I update it.
The condition is that the document has assigned a certain category.

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

The error you're getting suggests that you're trying to perform a write operation to a node that the user doesn't have write permission to.

Can you provide a brief description of the space structure and what the rule does more specifically? Also, where is the Writer role applied and to whom?

Thanks,

–Aladdin

rcortesr
Star Contributor
Star Contributor
I have a folder that is called suppliers. In this folder I have another folder that is called person in charge.
The users of the first folder cannot see the second folder.
I have created the new roll so that the users of the first folder can move documents to second.

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

I created the scenario you described and it worked for me.

Here's what I did:

- Created a space called Space1 in Company Home
- Created a space inside Space1 and called it Space2
- Created a user called space1 with Company Home as the home space
- Space2 has the following permissions:
   * Inherit Parent Space Permissions is unchecked
   * Invite user space1 as Writer
- Create a rule in Space1 which states that:
   * For inbound items that have a specific category (I chose a random category)
   * Move item to Space2

Then I executed the following scenario:

- Login as space1
- Create a document in Company Home
- Assign the same category that the rule is watching for
- Copy the document to the clipboard
- Browse to Space1
- Paste the document

When I did that the document never showed up in Space1 and at the same time I was unable to see Space2 due the permissions that were set on it.

I then logged in as admin and found the document in Space2

I hope this helps,

-Aladdin

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

I also tried updating the rule from Inbound to Update. I then did the following and got the same results:

- Logged in as space1
- Browsed to Space1
- Created a document
- Assigned the expected category to it

The document disappeared from Space1. When I logged in as admin I found the document in Space2.

Cheers,

–Aladdin

rcortesr
Star Contributor
Star Contributor
The steps that you have followed are correct. I have followed such but my result is different.
I will verify the process and I already will inform to you.

Thanks for all.

rcortesr
Star Contributor
Star Contributor
Hi,

I have verificated all the steps and everything seems correct.
My version of Alfresco is 1.3. Is this the problem?

Thanks.

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

I used 1.4.

I'm not sure if that's the problem, but you might wanna give 1.4 a try if you can.

When I have some time I'll try it on 1.3 and post the results.

Cheers,

–Aladdin

amartin
Champ in-the-making
Champ in-the-making
Hello,

I have a little situation with roles:
- I added to permissionDefinitions.xml permissions and permisions groups of previous post to define new rol Writer.
- Add new space called Draft and with Creators group invited with rol Coordinator. In this space also I created a simple workflow called Request approval, this workflow moves content to "Pending approval"
- Add new Space called Pending approval with:
        - Creator group invited with rol Writer.
        - SuperUsers group invited with rol coordinator.

Then I logged with a Creator user and execute workflow: OK

    If I add a rule in Pending approval to approve/reject the request, when a creator executes "Request approval", Alfresco says "Permission denied…"

What am I missing?

Best regards

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

Since you added a rule in Pending Approval, that rule will fire when you execute the Request Approval workflow. Since rules require their executer to have read permissions on that space, the firing of the rule in Pending Approval will throw a permission denied exception. Here's what's happening:

- Creator is inside Drafts space
- Creator executed Request Approval on a document
- Document is (I'm assuming) moved to Pending Approval space
  (This is possible since Creator has Writer role on the Pending Approval space)
- Rule in Pending Approval wants to fire now
  (Remember that you're still executing all this as the Creator user. And since rule firing requires read access on the space where it is firing in, you get a permission denied error since Creator does not have read access for the Pending Approval space)

This thread might help you get arond this issue:
http://forums.alfresco.com/viewtopic.php?t=3466&highlight=

Hope this helps,

–Aladdin