Hi John, Edo,
please see my replies below.
On Thu, Aug 4, 2011 at 2:09 PM, Edo Beutler <ebeutler(a)synventis.com> wrote:
Hi John,
Since we program such functionalities in Java components and not in
scripts I cant give you details on how to do it in Groovy, but I hope
I can explain Guillaume's idea of the script. I think his idea was the
following:
Register a listener to the save action. Doing this, your script /
method will always be called when a document gets saved.
When that happens you check for the saved document the field on your
ApprovalStatusClass and change the view rights on the document
accordingly if a change happened. So, if the reviewer checked a
document and changes the status to approved you change the view rights
of this document.
I hope this clarifies Guillaume's idea a bit ... and I understood the
idea correctly ;-)
Absolutely, that's exactly what I meant :-)
However, given that John is not a developer I'm afraid this solution is
going a bit tough for him to implement by himself.
Edo
On Wed, Aug 3, 2011 at 9:20 PM, Campbell, John <John.Campbell(a)viasat.com>
wrote:
Hi Guillaume,
I understand some of the concepts to which you're referring, but I'm more
of a writer/content guy, so my understanding of the code/scripting is very
limited. I'll try to follow along.
I've created a class called ApprovalStatus and made it a static list with
the
following values: in review|approved|rejected.
I created the ApprovalStatusClass Sheet and ApprovalStatusClass Template,
as
well.
That's a good start :-)
Here are some things I would like to be able to do
with this class. Can
you tell me if these are feasible?
Yes, all 3 are feasible.
1. Attach the class to the process document template I
have already
created that users will use when they create new pages.
You'd need to write a script to find all such pages and automatically add an
object of the right type to the pages. You can also do this manually using
the object editor.
2. Have the
class default to the "in review" value.
This can be set either by your script and/or by doing it manually through
the object editor.
3. Make this
element invisible to the Users group, but visible and
editable to the Supervisors
group (for example, a Supervisor would be able
to review a page that is "in review," and then if it is acceptable, change
the status to "approved").
This is something you can achieve in the sheet using the
$xwiki.isUserInGroup('XWiki.SomeGroup') API:
{{velocity}}
#if($context.user.isUserInGroup('XWiki.SomeGroup'))
your code goes here
#end
{{/velocity}}
I'm not sure I completely follow what you're
talking about with the script
section of your comment. But I would love to learn more. Can you elaborate a
bit more, please?
Please see Edo's clarification above.
Hope this helps,
Guillaume
Thanks,
John
-----Original Message-----
From: users-bounces(a)xwiki.org [mailto:users-bounces@xwiki.org] On Behalf
Of
Guillaume Lerouge
Sent: Wednesday, August 03, 2011 2:55 AM
To: XWiki Users
Subject: Re: [xwiki-users] Approval process for user edits?
Hi John,
- Create a process class with a validation status ("under review",
"validated"...) [1]
- Create a groovy script that listens for changes of the value of the
status property and updates a XWikiRights object attached to the page
based
on the value of the validation status property
[2]
- -> when the status changes, the script will apply appropriate
rights
to the page
- -> you can list only "validated" on the homepage of one of your
Hope this helps,
Guillaume
[1]
http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial
[2]
http://extensions.xwiki.org/xwiki/bin/view/Extension/Title+Post+Processing+…
On Tue, Aug 2, 2011 at 8:07 PM, Dale Amon <amon(a)vnl.com> wrote:
> On Tue, Aug 02, 2011 at 05:45:09PM +0000, Campbell, John wrote:
> > Hello again, XWiki community.
> >
> > I am working on using XWiki to be the repository for a library of
process
> documents that will be added to and updated
on a constant basis by
members
> of our team. It looks like it's going to
be a great resource for us.
> >
> > However, I do have a question that involves rights and permissions.
Our
> manager wants to incorporate an approval
process in the process document
> wiki. She wants users to be able to edit existing process documents and
> create new process documents, but for those documents to go through a
> technical/style review by supervisors before they are published for use
by
> the team. I don't see a way to manage
permissions/rights to make that
idea
> work for the wiki as a whole, though I can
see a workaround for new
process
> documents (force them to be created in a
"Review" space). Is there a way
to
> make user edits go through a review process
before they can be
published/go
> live?
> >
> > I realize that this goes against the basic concept of a wiki in some
> ways, and I explained to our manager that we have version rollback
> capability, but she wants these controls in place prior to publishing.
> >
> > Can anyone offer some guidance?