cancel
Showing results for 
Search instead for 
Did you mean: 

Visibility of documents according to the State

Julien_A_
Champ on-the-rise
Champ on-the-rise

Hello everybody,

I'm currently working for an IT project and I'd like to customize the visibility of my documents according to the document's State, using the User Groups

Here's my example :

I created a user group called "Developer" for all our developers

  • if the document is in the Draft state, "Developer" users cannot see the document
  • when the document is in the Validated state, it automatically appears for "Developer" people

How can I do that ?

Thanks a lot, Julien

1 ACCEPTED ANSWER

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

There is other way than Security Policy to implement this use case. Here, I assume your document is draft only after creation (certainly a simplification against your use case), but you will have the idea to implement if the document goes back to draft, I let you do it:

Create an eventHandler for creation Event :

  • Events : Document Created
  • Document type : yourDocType
  • Operation chain :
  • Fetch Context Document
  • User & Groups > Login As (let empty field)
  • Document > Set ACL : ReadWrite / yourGroup / aNameOfYourChoice / grant checked
  • Document > Set ACL : Everything / Everyone / aNameOfYourChoice / grant unchecked
  • User & Groups > Logout

And create a second eventHandler for the transition

  • Events : Lifecycle transition event
  • Document type : yourDocType
  • Operation chain :
  • Fetch Context Document
  • User & Groups > Login As (let empty field)
  • Document > remove ACL : aNameOfYourChoice
  • User & Groups > Logout

I think that's all. This is not the best implementation, I will suggest for a production server with a large volume of data a security policy. But this is fine for small/medium project.

View answer in original post

12 REPLIES 12

modification done.

thank you for your help 😉 have a nice day

we plan to create a documentation about that.