Add a property to a documents during creation based on a user roll

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Add a property to a documents during creation based on a user roll

Matthijs Tolkamp
Hey all,

Our use case is that we want the option that a user group can make certain documents confidential, meaning that only these usergroups can see these documents when they are unpublished. Preferebly we want the user to login with this roll and every document that he/she creates is automatically a confidential document only visible by the users in these groups.

The solution we came up with was to add a mixin to these documents with a field that denotes that these documents are only visible for these groups (so far so good as this already works). Now we want that this mixin with the property is added automatically on creation of the document.

Is it possible to add a certain property via the prototype based on a certain user roll/group? Or use a different prototype based on the user roll/group? We would prefer not to create a custom workflow for this if possible.

Any other ideas on how to implement the confidential documents for certain users are also welcome of course.

Kind regards,

Matthijs
Reply | Threaded
Open this post in threaded view
|

Re: Add a property to a documents during creation based on a user roll

Wouter Danes-2
Hi Matthijs,

Some thoughts:
- You can't get away with only giving site and the users that need to modify the document rights to the document, because then everyone else can see the document via the preview.
- Under 7.8, you would be able to leverage the fact that the site uses a different user for live and preview. In that case you might be able to get around it with rights on a certain folder that contain these documents.
- Before 7.8, I would opt for a special "staging" folder where these documents reside until they need to be published. The editor needs to move the document just before it gets published. There's a problem though: you won't be able to use delayed publishing this way, unless you don't mind showing the document via preview for a while.

Hmm, interesting corner case!

Regards,

Wouter

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Matthijs Tolkamp
Sent: maandag 4 februari 2013 8:55
To: [hidden email]
Subject: [Hippo-cms7-user] Add a property to a documents during creation based on a user roll

Hey all,

Our use case is that we want the option that a user group can make certain documents confidential, meaning that only these usergroups can see these documents when they are unpublished. Preferebly we want the user to login with this roll and every document that he/she creates is automatically a confidential document only visible by the users in these groups.

The solution we came up with was to add a mixin to these documents with a field that denotes that these documents are only visible for these groups (so far so good as this already works). Now we want that this mixin with the property is added automatically on creation of the document.

Is it possible to add a certain property via the prototype based on a certain user roll/group? Or use a different prototype based on the user roll/group? We would prefer not to create a custom workflow for this if possible.

Any other ideas on how to implement the confidential documents for certain users are also welcome of course.

Kind regards,

Matthijs



--
View this message in context: http://hippo.2275632.n2.nabble.com/Add-a-property-to-a-documents-during-creation-based-on-a-user-roll-tp7580314.html
Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Add a property to a documents during creation based on a user roll

Frank van Lankvelt
In reply to this post by Matthijs Tolkamp
hi Matthijs,

On Mon, Feb 4, 2013 at 8:55 AM, Matthijs Tolkamp
<[hidden email]> wrote:

> Hey all,
>
> Our use case is that we want the option that a user group can make certain
> documents confidential, meaning that only these usergroups can see these
> documents when they are unpublished. Preferebly we want the user to login
> with this roll and every document that he/she creates is automatically a
> confidential document only visible by the users in these groups.
>
> The solution we came up with was to add a mixin to these documents with a
> field that denotes that these documents are only visible for these groups
> (so far so good as this already works). Now we want that this mixin with the
> property is added automatically on creation of the document.
>
interesting case.

What you could do to implement this, is to create a new folder-type
and add that to all folders that can contain confidential documents.
You can then set up the domain configuration that only the privileged
users can see the folder-type query/template.  The hippostd:modify
properties of this folder-type can then take care of setting the
correct property value.

cheers, Frank


> Is it possible to add a certain property via the prototype based on a
> certain user roll/group? Or use a different prototype based on the user
> roll/group? We would prefer not to create a custom workflow for this if
> possible.
>
> Any other ideas on how to implement the confidential documents for certain
> users are also welcome of course.
>
> Kind regards,
>
> Matthijs
>
>
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Add-a-property-to-a-documents-during-creation-based-on-a-user-roll-tp7580314.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Add a property to a documents during creation based on a user roll

Wouter Danes-2
Ah yes, and mixins is also a property, so to add a mixin is just to adjust that property with an extra value, nice! :)

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Frank van Lankvelt
Sent: maandag 4 februari 2013 10:31
To: Hippo CMS 7 implementation list
Cc: Hippo CMS7 user list
Subject: Re: [Hippo-cms7-user] Add a property to a documents during creation based on a user roll

hi Matthijs,

On Mon, Feb 4, 2013 at 8:55 AM, Matthijs Tolkamp <[hidden email]> wrote:

> Hey all,
>
> Our use case is that we want the option that a user group can make
> certain documents confidential, meaning that only these usergroups can
> see these documents when they are unpublished. Preferebly we want the
> user to login with this roll and every document that he/she creates is
> automatically a confidential document only visible by the users in these groups.
>
> The solution we came up with was to add a mixin to these documents
> with a field that denotes that these documents are only visible for
> these groups (so far so good as this already works). Now we want that
> this mixin with the property is added automatically on creation of the document.
>
interesting case.

What you could do to implement this, is to create a new folder-type and add that to all folders that can contain confidential documents.
You can then set up the domain configuration that only the privileged users can see the folder-type query/template.  The hippostd:modify properties of this folder-type can then take care of setting the correct property value.

cheers, Frank


> Is it possible to add a certain property via the prototype based on a
> certain user roll/group? Or use a different prototype based on the
> user roll/group? We would prefer not to create a custom workflow for
> this if possible.
>
> Any other ideas on how to implement the confidential documents for
> certain users are also welcome of course.
>
> Kind regards,
>
> Matthijs
>
>
>
> --
> View this message in context:
> http://hippo.2275632.n2.nabble.com/Add-a-property-to-a-documents-durin
> g-creation-based-on-a-user-roll-tp7580314.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Add a property to a documents during creation based on a user roll

Frank van Lankvelt
On Mon, Feb 4, 2013 at 10:54 AM, Wouter Danes <[hidden email]> wrote:
> Ah yes, and mixins is also a property, so to add a mixin is just to adjust that property with an extra value, nice! :)
>
err, I'm not sure if this works.  AFAIK the mixin property is
protected and can only be changed using the (add|remove)Mixin methods.
It would be a nice way of supporting adding/removing mixins in the
folder workflow, but I don't think it's there yet.

cheers, Frank

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Frank van Lankvelt
> Sent: maandag 4 februari 2013 10:31
> To: Hippo CMS 7 implementation list
> Cc: Hippo CMS7 user list
> Subject: Re: [Hippo-cms7-user] Add a property to a documents during creation based on a user roll
>
> hi Matthijs,
>
> On Mon, Feb 4, 2013 at 8:55 AM, Matthijs Tolkamp <[hidden email]> wrote:
>> Hey all,
>>
>> Our use case is that we want the option that a user group can make
>> certain documents confidential, meaning that only these usergroups can
>> see these documents when they are unpublished. Preferebly we want the
>> user to login with this roll and every document that he/she creates is
>> automatically a confidential document only visible by the users in these groups.
>>
>> The solution we came up with was to add a mixin to these documents
>> with a field that denotes that these documents are only visible for
>> these groups (so far so good as this already works). Now we want that
>> this mixin with the property is added automatically on creation of the document.
>>
> interesting case.
>
> What you could do to implement this, is to create a new folder-type and add that to all folders that can contain confidential documents.
> You can then set up the domain configuration that only the privileged users can see the folder-type query/template.  The hippostd:modify properties of this folder-type can then take care of setting the correct property value.
>
> cheers, Frank
>
>
>> Is it possible to add a certain property via the prototype based on a
>> certain user roll/group? Or use a different prototype based on the
>> user roll/group? We would prefer not to create a custom workflow for
>> this if possible.
>>
>> Any other ideas on how to implement the confidential documents for
>> certain users are also welcome of course.
>>
>> Kind regards,
>>
>> Matthijs
>>
>>
>>
>> --
>> View this message in context:
>> http://hippo.2275632.n2.nabble.com/Add-a-property-to-a-documents-durin
>> g-creation-based-on-a-user-roll-tp7580314.html
>> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>
>
>
> --
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Add a property to a documents during creation based on a user roll

Gerrit Berkouwer
This post was updated on .
In reply to this post by Frank van Lankvelt
Creating seperate folders for the confidential documents is not a clean solution :-(.

The users should be able to use the cms just as always, with the same folder and document structure. This means everywhere in the cms, on all document types. Moving documents to other folders at the moment that they can be public instead of confidential is very user unfriendly. Think about maybe 100 documents that should be confidential for a group of editors... Publishing to live should trigger the fact that from that moment on, the documents loose their confidential status...

Are we the first customer that wants 'confidential' documents per user group?
--
Greetz, Gerrit
Reply | Threaded
Open this post in threaded view
|

Re: Add a property to a documents during creation based on a user roll

Frank van Lankvelt
On Wed, Feb 13, 2013 at 9:47 PM, Gerrit Berkouwer
<[hidden email]> wrote:

> Creating seperate folders for the confidential documents is not a clean
> solution :-(.
>
> The users should be able to use the cms just as always, with the same folder
> and document structure. This means everywhere in the cms, on all document
> types. Moving documents to other folders at the moment that they can be
> public instead of confidential is very user unfriendly. Think about maybe
> 100 documents that should be confidential for a group of editors...
> Publishing to live should trigger the fact that from that moment on, the
> documents loose their confidential status...
>
in that case, the only option I see is to create a workflow that's
coupled to the mixin that's present on each document.  The workflow
can then mark the documents as 'confidential', and of course it's only
available (as draft or preview) to the group that's authorized to do
this.  With domain configuration, it is possible to make the live
('published') document variant readable for everyone.

The logic to set the property on document creation is most easily
implemented by using a workfloweventworkflow.  Such a workflow will be
invoked when a document is created (when suitably configured) and can
then determine if the user is in the special group.

hope this helps,
cheers, Frank

> Are we the first user that asks for 'confidential' documents per user group?
>
>
>
> -----
> --
> Greetz, Gerrit
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Add-a-property-to-a-documents-during-creation-based-on-a-user-roll-tp7580314p7580422.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Add a property to a documents during creation based on a user roll

Wouter Danes-2
The biggest problem is preview: AFAIK the credentials that are entered when trying to access the preview environment aren't the same credentials that are used to access the documents via the site in preview mode.
This means that confidential documents cannot be previewed.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Frank van Lankvelt
Sent: donderdag 14 februari 2013 13:53
To: Hippo CMS 7 implementation list
Cc: Hippo CMS7 user list
Subject: Re: [Hippo-cms7-user] Add a property to a documents during creation based on a user roll

On Wed, Feb 13, 2013 at 9:47 PM, Gerrit Berkouwer <[hidden email]> wrote:

> Creating seperate folders for the confidential documents is not a
> clean solution :-(.
>
> The users should be able to use the cms just as always, with the same
> folder and document structure. This means everywhere in the cms, on
> all document types. Moving documents to other folders at the moment
> that they can be public instead of confidential is very user
> unfriendly. Think about maybe
> 100 documents that should be confidential for a group of editors...
> Publishing to live should trigger the fact that from that moment on,
> the documents loose their confidential status...
>
in that case, the only option I see is to create a workflow that's coupled to the mixin that's present on each document.  The workflow can then mark the documents as 'confidential', and of course it's only available (as draft or preview) to the group that's authorized to do this.  With domain configuration, it is possible to make the live
('published') document variant readable for everyone.

The logic to set the property on document creation is most easily implemented by using a workfloweventworkflow.  Such a workflow will be invoked when a document is created (when suitably configured) and can then determine if the user is in the special group.

hope this helps,
cheers, Frank

> Are we the first user that asks for 'confidential' documents per user group?
>
>
>
> -----
> --
> Greetz, Gerrit
> --
> View this message in context:
> http://hippo.2275632.n2.nabble.com/Add-a-property-to-a-documents-durin
> g-creation-based-on-a-user-roll-tp7580314p7580422.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html