Working Copies (Iterate) permissions and workflow - workflow

We are trying to implement a custom checkout policy for a Plone Document Management System. In this, we would like to be able to have Working Copies of published documents after a certain period of time.
Iterate seems perfect for this.
However, we only want the checkout to be available for published documents. So here is the reasoning....
Since the workflow controls several permissions, we added both "iterate : Check in content" and "iterate : Check out content" to the permissions tab in the portal_workflow tool.
We then marked the checkboxes in the permission tabs of the individual workflow states for those people who have checkout rights.
However, in the frontend, everybody keeps having the option to checkout documents regardless of the state the document is in.
What are we missing?
PS: We already checked out the document on "Working Copy Workflow Customization" and in our opinion this relates to changing the workflow for checked out documents, which is not what is intended here...

The problem here I think is the checkout_allowed method in plone.app.iterate/browser/control:Control.
It doesn't check on any permissions before allowing checkout for the user(it assumes if they user can view it, they should be allowed to check it out to home folder and such--I guess that's a reasonable use case).
Then, in the portal_actions/object_buttons/iterate_checkout it simply uses the "View" permission to allow the button to be placed there.
So to be completely correct for this, you would have to customize the checkout_allowed method and the permission used in the action.
To do it quick and simple so the user just doesn't see the button, change the button permission to "iterate: checkout content".

Related

Start a workflow on page activation without activating the page in AEM 6.2

I need a setup where users can update a page and then submit it for approval/activation in AEM 6.2. The page would be submitted to workflow where a content approver/administrator would review and publish the page. This seems like a common setup for content managment, but I can't figure out how to do it in AEM.
I have done the following:
setup a user that has permission to update but does NOT have
replicate permission on folderX.
setup users with update and replicate permissions on folderX and added them to a group "content-authors-approvers"
created a workflow where the first step of the workflow is the page will be submitted for approval and publication to member of "content-authors-approvers" group
assigned this workflow to folderX
However, when a user does NOT have replicate permission, the "publish" option does not show up at all. This makes sense, really....but then, how does one go about setting up a workflow like this?
From what I've read about this in earlier versions of AEM/CQ5, the replicate/publish option was still available to all users, but it would automatically kick off workflow if the user did not have replicate permissions. (see Start a workflow on page activation without activating the page in CQ5 )
this seems to have changed in 6.2. can anyone help?
I have tried looking up online, but found nothing
There is a native workflow to handle that. It's named Publish Example. see it here: http://localhost:4502/etc/workflow/models/publish_example.html . I believe that it's better then the automatic triggering cause the author actually knows he triggers a workflow (whilst when it happened automatically there was no info about that). To explicitly call it you have to either from /siteadmin select a page and click workflow on it, or do it from sidekick or in touch.
sidekick:
touch - editpage:

What version of AEM/CQ5 page will be seen when a page is already in a separate workflow?

If you take a page and put it in a workflow, then if someone wants to modify that page – in an emergency situation and essentially start another workflow on it –
Is that possible to send that page through another workflow?
If you don’t want to send the same page through a workflow, but just want to edit it, can you?
Apparently If one person is editing a CQ page and same page is edited by someone else at the same time, at production level, how the CQ / developer handles the situation?
Thanks in Advance
It is not possible to subject a page to more than one workflow at once, none of the interfaces allow this to happen.
The pages can be edited even when they are subject to a workflow. In emergency situations where in it is not possible to complete the workflow , users with required privileges can terminate the workflow from the instances tab of the workflow console (/libs/cq/workflow/content/console.html). Pages can be usually activated even if they are subject to workflows.
The repository is accessed via repository session. Based on the credentials provided the user gets a repository session. Any changes made via that session is only visible to the other users when the session is saved. Since different sessions are used , multiple users can edit the same page simultaneously. The data in dialogs are loaded via asynchronous GET requests when EDIT is clicked and not on page load , so it is very unlikely that the user will be editing old data. They can still overwrite some other user's changes. Developers do not have to handle these situations unless there is some special requirement. If a user wants to stop other users from editing a page , they can use the lock functionality that comes out of the box. A locked page can be unlocked only by the user who locked it or an administrator. A page or node can be programmatically locked via the JCR API.

CQ5 workflow inbox notifications persisting after workflow finished

I've implemented a custom workflow in Adobe CQ5.6, similar to http://blogs.adobe.com/learningwem/2011/11/30/cq5-4-workflow-example-approve-reject-by-the-reviewer/
I'm using CQ5 inbox notifications only -- no email notifications.
The problem is, after the Approver selects either "Approve" or "Reject", the inbox notification does not get removed, even though the workflow continues / completes.
There doesn't seem to be an option to manually delete a notification, unless you go into crxde and delete the nodes. So the main concern here is that notifications will quickly pile up, making it confusing to figure out which ones are current, and ultimately clogging up the app.
This only seems to happen at this exact step in the workflow. The Author's notifications disappear once they've been dealt with, as you would expect.
Has anyone had anything like this happen before?
Something about the way I worded this question helped me figure out the answer.
The Author's notifications disappear ... as you would expect
This made me think it might be a user permission problem rather than anything to do with the workflow step.
I confirmed this by switching the roles of the two user types, (so the Approver starts the workflow and the Author must approve the change). As I guessed, it was any notification assigned to the Approver, rather than notifications generated by that particular workflow step, which were not disappearing.
Specifically, the permission that was missing was for /etc/workflow/instances. I allowed all methods for that user, and my problem is resolved.
You can edit permissions via /useradmin.html in your CQ5 instance (in my case, http://localhost:4502/useradmin.html )

Disabling customer login & registration on checkout in Magento

I've been looking for a few days now for a way to disable the automatic customer registration that occurs when a customer finishes an order in the checkout in Magento. What happens is that the user is logged in to his or her account, and two emails are sent. One containing the order confirmation, and another one, welcoming the user as a customer, including his or her account information.
What I'd like to do is to disable the email containing the welcome, and disable the registration/ login of the account.
Like I said, I've been trying to find some leads on where to look for a few days now, but to no avail. I'd appreciate if someone could help me figure out what files to look at, and also what parts of those files.
Also, maybe I should mention that the website is using a One Step Checkout.
Thanks in advance,
Base on your system setting you need to make changes in one of the two files listed below. Copy the templates to your custom theme folder and make the changes as needed to remove the login section and links.
/app/design/frontend/base/default/template/checkout/onepage/login.phtml
/app/design/frontend/base/default/template/persistent/checkout/onepage/login.phtml

CRM 2011, REST, OData and Security Roles

Is there any special security privileges that i need to give my users so that they can run some custom code? I have a javascript library that is triggered on a button click that then gets all of the selected items in a subgrid. When I get all of the check-boxed items I then feed that into an update operation and upload the string if items (in the form of GUIDs) into a Single Line Textbox field on my entity. Once that field is updated they will trigger a dialog which consumes the textbox field and does some more work on it.
The problem is that nothing happens. I solved one issue once I figured out that the user needs Organizational write access to the entity, but now I see another exception "...is missing prvReadWorkflow privilege" does that mean these users need Read Access on Organizational workflows?
Am I missing anything else?
I don't have an explaination for why you require read access to workflows for this update operation, but this microsoft CRM forum post appears to be about the same issue you are having.
Tanguy suggests you add read access to processes for the affected user.