I have created a content approval workflow with 3 States: Draft, Awaiting Approval & Approved.
Once the content editor completes their changes they submit the request and the item goes to awaiting approval state.
When the content manager/approver logs in to Sitecore, in the workbox they can see the option to approve the changes.
But when viewing the item from content editor the "Approve" and "Reject" button is disabled.
After editing the item these buttons become enabled.
View for Content Manager
Please suggest why the "Approve" and "Reject" buttons are not enabled when the Content Manager views the item.
This is typically due to access rights. Besides write access to the item itself, and "Language Write" access on the current language, the user also needs the "Workflow Command Execute" access right on the command ("Approve" and/or "Reject" in your example). The user also needs "Workflow State Write" access right on the workflow itself.
I've found it best to create workflow roles, such as "Workflow Author", "Workflow Approver" and so on, and assign those roles to the users accordingly. Those roles can then be assigned to the workflow states (/sitecore/system/Workflows/MyWorkflow/MyWorkflowState) and workflow commands (/sitecore/system/Workflows/MyWorkflow/MyWorkflowState/MyWorkflowCommand) accordingly
It could also be due to item locking. If lock is required for editing (a Sitecore setting) and someone else has a lock on the item, the item cannot be transitioned into another state.
Related
I have Created the SharePoint custom List with 3 views(Ex.test1,test2,test3).
I want to assign 3 views to 3 user,one should not have permission to view other's view.
Any help would be appreciated.
As far as I know, this is simply not possible, i.e. assigning views to a certain user. You can have 'Public' views (visible to everyone with access to the list as the name implies) and 'Personal' views (visible only to the user who created them, the user must have the relevant permission enabled for this). Personal views cannot be shared.
Also, if it is critical that data is only visible to certain users and not others, a user can look at items not in their View by simply changing the ID in the Item View in the URL so View filtering is not a good way to go about this.
Could you please elaborate on what exactly are you trying to achieve, i.e what is the difference between the views etc.?
UPDATED:
Here you can get another good solution.
https://sharepoint.stackexchange.com/questions/253723/restrict-list-view-to-role-sp-o365
It is really good solution because you need only admin rights and no code.
You need to create folders, break role inheritance and add permissions on folders.
My OLD answer:
From my experience It is depend on what is your expectations from solution, your limits, what you want to get and what things you can sacrifice and in some cases what SharePoint edition you are using.
Note: SharePoint does not have out-of-box fully customizable list item permissions.
I can say about some expectations, some details, some solutions and workarounds and how to implement this.
You can try to get something that applied to you:
.1. You want to disallow users to see other users views. But:
users with specific permissions can create their own views and therefore they can create views with all fields and all list items data from other disallowed views,
users can get data about all fields in list items and all list items from REST API, JSOM API and other SharePoint out-of-box web services,
users can open any list item, change URL item ID to another and see any data from other list item.
To achieve this you can:
.1.1. Open list under each user and create its own Personal View.
Personal Views displayed only for individual users.
.1.2. Create Public View and set its Target Audience.
Open view page -> in right corner click Gear icon -> Edit Page -> on the page click arrow icon on list view web part -> Edit Web Part -> Section "Advanced" -> Field "Target Audiences".
If you does not have this option then enable target audiences.
List Settings -> Audience targeting settings -> Enable audience targeting.
In audiences you can specify SharePoint users or groups who has permissions to see this web part.
Here you can see different uses of audiences and how to enable it on list or library: https://support.office.com/en-us/article/target-content-to-specific-audiences-33d84cb6-14ed-4e53-a426-74c38ea32293
.1.3. Create Public View, open its page, edit page, delete List View Web Part, add Content Query Web Part and set its Target Audience.
Here you can see info about Target Audiences:
https://support.office.com/en-us/article/target-content-to-specific-audiences-33d84cb6-14ed-4e53-a426-74c38ea32293
But I didn't perform this by myself.
.1.4. Add javacript to list view page.
This javascript will check user permissions and hide view or redirect user to some other location or will make other actions.
.2. Users cannot see other users created list items from any source (any list views, any API and web services).
.2.1.
Note: this is limited. User can only read, edit list items which created by him. You cannot apply this on other users created list items.
To achieve this you can:
List Settings -> Section "Advanced settings" -> Block "Item-level Permissions" -> "Read items that were created by the user" and "Create items and edit items that were created by the user" options.
.2.2. Create different lists for different users with different permissions.
.2.3.
Note: this is limited by SharePoint unique permissions limits.
You can create SharePoint workflow that run on list item creation. This workflow will break list item role inheritance and set new permissions for this items by some conditions.
This is may be good but here some limits exists. SharePoint limit list to have more than some limit number of list item unique permissions.
.2.4. I don't know if SharePoint has some limits to this but you can try and I don't know if you can perform this from public API but you can try to investigate.
You can create SharePoint workflow that run on list item creation. This workflow will set Target Audiences on list item.
Here you can see info about Target Audiences:
https://support.office.com/en-us/article/target-content-to-specific-audiences-33d84cb6-14ed-4e53-a426-74c38ea32293
.2.5. If you use SharePoint On-premise edition then you can add:
.2.5.1. List event receiver that run on list item Create event and perform following actions:
- break list item role inheritance and set new permissions for this items by some conditions
OR
- set Target Audiences on list item
.2.5.2. Create Timer job, deploy, schedule it in SharePoint Central Administration.
This timer job will be check newly created list items periodically and:
- break list item role inheritance and set new permissions for this items by some conditions
OR
- set Target Audiences on list item
.2.6. You can create Console Application (c# language) that connect to SharePoint, check newly created list items periodically and:
- break list item role inheritance and set new permissions for this items by some conditions
OR
- set Target Audiences on list item.
This console app can be scheduled on any server in your company through Windows Task Scheduler.
.2.7. You can write Powershell script that connect to SharePoint, check newly created list items periodically and:
- break list item role inheritance and set new permissions for this items by some conditions
OR
- set Target Audiences on list item.
This Powershell script can be scheduled on any server in your company through Windows Task Scheduler.
.2.8. You can create Windows Service (c# language) that connect to SharePoint, check newly created list items periodically and:
- break list item role inheritance and set new permissions for this items by some conditions
OR
- set Target Audiences on list item.
This windows service can be installed on any server in your company.
.2.9. May be you can create some other periodically running code (like Workflow, Console App, PowerShell script, Windows Service) in any server.
This code will:
- break list item role inheritance and set new permissions for this items by some conditions
OR
- set Target Audiences on list item.
I think code wrapper not limited to any implementation.
I think this ways is applicable to many cases.
If you want more customizable control, or you have some limits in implementation, then you can create many workarounds by many ways. Workaround can close many permissions holes but may be not all holes:
.1. You don't want user can create views from list view page UI.
You can add javascript to hide ribbon, buttons or some other UI elements to disallow user to create its own view or to switch to another user view.
If user is smart he can avoid this by using REST API, JSOM or web services to get neccessary list item data.
.2. You don't want user can see any list item data changing URL list item ID to another.
.2.1. You can add some javascript on default form pages.
On New Item form page, on Display Item form page and on Edit Item form page.
This javascript will be check user permissions and hide data or redirect user back to list view page or somewhere.
.2.2. You can create HttpModule that intercept web requests and check user permissions and redirect him to another page if he don't have permissions.
HttpModule must be added to IIS and SharePoint web config.
.3. You can try to disallow REST API, JSOM using but I didn't do that.
I think you can add HttpModule to IIS that will intercept web requests and check user permissions and return bad request HTTP status codes and error messages.
But I didn't yet try this by myself.
Here you must know all API endpoints to close access to them.
May be here exists many other different workarounds but I don't remember about them now.
Try something from what I said. May be it help you.
I am unable to see 'Add Schedule' button on jasper server 6.2.1 for old or new reports.
Earlier, on right clicking a report and choosing schedule option, opened a page that lists the scheduled jobs for the selected report. This page also had a 'Add Schedule' button to create a new schedule.
Now this button is not visible. I am logged in from superuser.
Administrative view
When using login, view -> repository, selecting reports under organization:
This is the repository where you set user rights or change settings in the report. No possibility to change schedules (at least in v6.2.1).
Schedule view
In the "library" or when selecting "reports" after logging in on your dashboard you are able to change the schedule.
NOTE: This differs because a user might have rights to change schedules, but not to change report settings.
We have two Sitecore 6.5 sites defined within one Sitecore instance so our structure is
/sitecore/content/Site1/sitecore/content/Site2
If a user selects a site in the Sitecore backend, and then Publishes the site, will Sitecore then publish just the selected site or both the sites within the Sitecore instance?
Out of the box Sitecore will publish everything from both sites on a "site publish"- you can resolve this by:
Dead simple approach: just do an "item publish" on the desired site root and include subitems.
Configure a custom publish target as described by John West: http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2011/05/All-About-Publishing-Targets-in-the-Sitecore-ASPNET-CMS.aspx
If you have 2 sets of users, i.e. one role for each site with the correct read/write permissions set, then you could restrict what gets published using security.
In config set Publishing.CheckSecurity to true
If you set Publishing.CheckSecurity to true, then members of the
Sitecore Client Publishing role must have both read and write access
in order to publish an item. If you additionally set the
Publishing.RequireTargetDeleteRightWhenCheckingSecurity setting in the
web.config file to true, then the user must have delete access in the
item in the target database to publish a deletion.
Of course, if a user belongs to both roles then that still means both sites will be published, you can just publish an item and sub-items
Use Default or Custom Access Rights to Control Whether Users Can Publish an Item
Publishing Security Basics
Is it possible to apply a workflow in Sitecore only for a particular user?
I want to apply a workflow when the editor edits any item, but don't want to apply a workflow on that item in case an Admin edits it. Is that possible?
First Question:
Workflow is applied to an item. Workflow, however, does have security around it. This means that you can have different actions/flows at a user (or role) level.
Second Question:
Users who have the "User is Administrator" checkbox checked on the "edit user screen" will in fact bypass workflow.
In the last year we've had a couple of incidents where a user accidentally unpublished the 'Home' item (which is the root item in our site), before publishing it to our 'Live' database, which removed it from the site.
What is the best way to prevent important content from being unpublished from a production Sitecore web site?
Your "easy" security options are to either protect the Home item itself from editing, or to restrict access to publishing options. Using standard Sitecore security, disable write access on Home for a particular user role, or disable read access on the Publishing Restrictions chunk or button in core (/sitecore/content/Applications/Content Editor/Ribbons/Chunks/Publish Restrictions/Change).
If you really don't need anyone besides admins editing the Home item, you can also Protect the item from the Configure ribbon.
If you'd like to just disable publishing restrictions on Home, that could be more complicated. Your best approach would likely be to extend the SetPublishing command. The following is untested:
Extend Sitecore.Shell.Framework.Commands.SetPublishing
Override Execute(CommandContext)
Check context.Items[0] to see if it's your home page (GUID or Template ID check if multi-site). If so, abort. If not, call base.Execute(context). (You could also add a check for Sitecore.Context.User.IsAdministrator if so desired.)
Replace item:setpublishing command in Commands.config.
Reference Sitecore.Shell.Framework.Commands.SetPublishing in your favorite decompiler as needed.
You can also just mark the home item as protected. You can double-check but I believe that prevents any mod/del of an item. In the Configure tab, see Protect Item button