This question about Using an extension: Answered

Problem with Userrights using WorkflowPlugin

Hi,

I'm using the workflow Plugin. I have defined the the state and Action table. On the Bottom of one Topic, I have set the Worklfow.

When I loogged on as Admin I can change the state without an problems, but when I logged in as an normal User in the defined group, I can't change the state.

The Wokflow Definition:

---++ Status

| *State*       | *Allow Edit* | *Message* |
| ERSTELLT | TechnologieGroup| Dokument wurde erstellt|
| WARTENAUFKONTROLLE | TechnologieGroup| Wartet auf Kontrolle. |
| KONTROLLIERT| TechnologieGroup| Dokument freigegeben. |
|WIRDBEARBEITET | TechnologieGroup| Dokument wird bearbeitet|

---++ Aktionen
| *State*  | *Action* | *Next State*  | *Allowed*  |
| ERSTELLT | kontrollieren | WARTENAUFKONTROLLE | nobody|
| WARTENAUFKONTROLLE | dokument freigeben | KONTROLLIERT | nobody |
| WARTENAUFKONTROLLE | dokument nicht freigegeben | ERSTELLT | TechnologieGroup |
| KONTROLLIERT | zurück auf Bearbeitet | WIRDBEARBEITET | TechnologieGroup |
| WIRDBEARBEITET | kontrollieren | WARTENAUFKONTROLLE | TechnologieGroup |

The Definition on the Bottom of my Topic:
   * Set WORKFLOW = WorkflowDokumente

| *Workflow* ||
| Aktueller Status | %WORKFLOWSTATE% |
| Transitions available | %WORKFLOWTRANSITION% |
| State message | %WORKFLOWSTATEMESSAGE% |
| Last time in APPROVED state | %WORKFLOWLASTTIME_APPROVED% |
| Last version in APPROVED state | %WORKFLOWLASTVERSION_APPROVED% |
Workflow history: %WORKFLOWHISTORY%

Thanks for your Help

Hi,

I think you need to prefix wikinames and wikigroups with "Main": Main.TechnologieGroup

No, the Main is irrelevant (it's just noise).

The plugin has two criteria for permitting a state change (1) the workflow permits it and (2) the user has CHANGE access to the touched topic. From what you describe I would guess the user in question does not have CHANGE access.

-- CrawfordCurrie - 15 Feb 2011

Hi,

currently I might have maybe similar problem. Which was solved by a hack in Foswiki/Plugins/Workflowplugin/Workflow.pm.

I needed to change slightly the sub _isAllowed {
    elsif ( defined &Foswiki::Func::isGroup ) {
        my $thisUser = Foswiki::Func::getWikiName();
        foreach my $allowed ( split( /\s*,\s*/, $allow ) ) {
            ( my $waste, $allowed ) =
              Foswiki::Func::normalizeWebTopicName( undef, $allowed );
            %RED%  $allowed =~ s/^\s+//;%ENDCOLOR%
%RED%              $allowed =~ s/\s+$//;%ENDCOLOR%

The trimming of $allowed helped for me.

-- VasekOpekar - 21 Apr 2011

QuestionForm edit

Subject Using an extension
Extension WorkflowPlugin
Version Foswiki 1.1.2
Status Answered
Topic revision: r4 - 21 Apr 2011, VasekOpekar
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy