Workflow of the Access Toolbar

We need the following parameters:

Object Status

if (@admin_p@ eq 1) or ( (@approval_p@ eq 1) and (@publish_p@ eq 1) ):

if (@public_p@ eq 1)
    [Public] Make private

if (@public_p@ eq 0)
    if (@approval_p@ eq 1) and (@in_review_p@ eq 1)
        if (@review_state@ eq library_review)
            [Private] [In review] Make public
        if (@review_state@ eq library_clarify)
            [Private] [Needs clarification] Make public
    else
        [Private] Make public

if (@write_p@ eq 1) and (@archived_p@ eq 0):

if (@public_p@ eq 0)
    if (@in_review_p@ eq 0)
        if (@approval_p@ eq 1)
            [Private] Propose to publish
        else
            [Private] Make public
    else
        if (@review_state@ eq library_review)
            [Private] In review
        if (@review_state@ eq library_clarify)
            [Private] Review: Needs clarification
if (@public_p@ eq 1)
    if (@approval_p@ eq 0)
        [Public] Make private
    else
        [Public]

all other users with read permission:

if (@in_review_p@ eq 1)
    [Private] [In review]
if (@public_p eq 1)
    [Private]

Archive

if (@write_p@ eq 1) or (@admin_p@ eq 1) or ( (@approval_p@ eq 1) and (@publish_p@ eq 1) ):

if (@archived_p@ eq 1)
    [Archived] Remove from archive
if (@archive_p@ eq 1) and (@archived_p@ eq 0) and ( (@admin_p@ eq 1) or (@publish_p@ eq 1) or (@approval_p@ eq 0) or ( (@public_p@ eq 0) and (@in_review_p@ eq 0) ) )
    Put in archive

Access control

if (@admin_p@ eq 1) or ( (@write_p@ eq 1) and (@archived_p@ eq 0) ):

Access Control

Delete Object

if (@delete_p@ eq 1):

if (@category_id@ is nil) or (@category_id@ eq none)
    Delete Object
else
    Delete Object

Approval Tasks

if (@approval_p@ eq 1) and (@in_review_p@ eq 1) and ( (@publish_p@ eq 1) or (@admin_p@ eq 1) ):

Manage Approval