How to force SharePoint tasks to be editable by "Assigned To" only? - security

We are using the default Task list from a Team Site and would like to only allow those that the Task is "Assigned To" to edit the tasks. How do you go about enforcing this?
When we tried the "Advanced Settings", we found that "Only their own" meant only those tasks created by the current user.

It looks like you need to create an event handler that updates the permission on the Task everytime the assigned user is changed.
Quite a few people have had this problem in the past.
Check out this site for an example of the problems people have had. That said it should work out-of-the-box if you copy content when setting up the Task List.

Looks like, an event handler is the way to go. I found this page in some of my searching and it explains a lot of the problems related to this issue:
Email Notifications and Alerts - Sharepoint Tasks List
Unfortunately, the client wants no custom code and wanted SP Designer workflows and browser based customizations only...

Related

Using Sharepoint in a Corporate environment - Archiving and Workflows

I was recently put in charge of being "SharePoint Administrator" for my department. I am being tasked with the following:
Create a user friendly interface for end users (Done)
Create an auto-archive process for aged documents. (ISSUE)
Create an interactive workflow for certain reports requiring feedback from end user. (ISSUE)
SO - I am not new to SharePoint, but definitely new to the coding and back end admin component. I have searched to the ends of the internet but cannot find a step - by - step that doesn't require central admin access (I don't have it, and don't know how to obtain it).
My questions are:
Is there a way to set up auto-archive on SharePoint to archive to an external database such as LiveLink without having Central Admin Access? If so - please advise on steps to do so.
If NOT - Is there an alternative and can I set up auto archive to another list within the main SharePoint (I have found tutorials for this but can't seem to find any with step by step instructions so someone without advanced knowledge could go through the process).
Workflows - Am I able to upload data to the sharepoint and have a workflow that would send a notification externally (via outlook) to an enduser indicating action required on the data? The end user would then have to log in to the SharePoint, review the data and take whatever action is required (let's use checking a checkbox as an example of action required). From there - a notification would go to - say - a senior manager to then go in and access the data and check another box for their approval. From that point an email notification would go out that the workflow and item is completed and no further action is required.
I apologize for such a long set of questions, I just really want to understand this and feel like I am so close but just need a little more insight. If you can only answer part of this that's fine too!
Thanks so much to everyone!
Shannon

Link to start my workflow doesn't appear on my list

I have already create my workflow on SharePoint designer and publish it to my SharePoint library so the Column which has the workflow name was added but the link to start my workflow(has the name of my first step) doesn't appear.
You question is a bit vague but the column in the list simply shows the status of the workflow. To kick off the workflow manually, you need to go to the library and select the item you want to kick the workflow off for. In the ribbon, there is an option to go to workflow settings and in that page you will have the option to start the workflow. If you have correctly built the workflow this should run it. You left important information out of your request such as what version of SharePoint, what triggers your workflow, etc.. so this is the best I can do with that. If that does not solve the issue, I would suggest providing more information. Not many people will take any time to do guess work.

SharePoint 2013 Event Receiver for "Stop Inheriting Permissions" functionality

Business Case :
Every time Permission Inheritance is broken, I need certain custom things (through code) to happen on my SharePoint environment.
Details: If user clicks on Site Settings -> Site Permissions -> "Stop Inheriting Permissions", I need a custom code called so that certain actions can be performed like changing the group name, make an entry in the global list etc...
Image : http://i.stack.imgur.com/z2eo6.png
Even Receivers are not new in SharePoint 2013. They did exist in previous versions of SharePoint. But they are still limited and I could not see one which gets triggered with users' action of clicking that button i.e. Stop Inheriting Permissions. I can capture "Updated" event and check programmatically if permission inheritance was broken but that will fire every time which to me is dirty solution.
If above is not possible then what are other possible alternatives ?
One I know is - Hide "Stop Inheriting Permissions" and create a custom one which will let me achieve above Business Case. But I want to minimize custom coding as much as possible.
Found out an answer the same day I posted the question.
SharePoint does offer class SPSecurityEventReceiver which has required Event Receivers.
(1) InheritanceBreaking (2) InheritanceBroken (3) InheritanceReset in my case.
Hope that helps someone !

Can I change the name of the Sharepoint workflow?

I need to change the name of a Sharepoint designer workflow.
There is a simple direct way I can edit it via SPD right clicking the workflow name. However often the simple, apparently straight forward things that cause unforeseen
issues.
Will this affect the functionality of the workflow or application?
Thanks!
In addition to breaking all or most existing hyperlinks to that workflow (such as initiation forms, etc.) and the weirdnesses already pointed out, renaming the workflow can negatively affect the running instances of the workflow.
(Sorry, I can't be more specific; I just know that it's not recommended unless necessary. :-/)
You can also rename the workflow by:
Open the site with the workflow in SPD
Open the workflow in SPD
Click the "< Back" button
Change the name of the workflow
Click Finish to save
AFAIK, renaming the workflow (the way I specified above) will not cause issues.

What's the best way to report errors from a SharePoint workflow?

I have a custom action in a workflow and would like to report an error to the user when something goes wrong. What's the best way of doing that?
UPD: Ideally I would like to put the workflow in the error state and log a message to the workflow log. That doesn't seem possible. What's the closest I can get to it? I want to a reusable solution,something that's easy for users to set up when using my custom action in SharePoint Designer.
Added more details to the question.
#mauro that takes care of storing the error, but how do I display the error to the user in a way which makes sense?
#AdamSane That's seems like a rather fragile solution. It's not a matter of setting this up once on a single site. I need something others can add using SPD.
when you throw the error your error handler can then email the user, or better if the list is massive, add the error state to the workflow item - i think this is default functionality though as the error would be mentioned there.
http://www.sharepointsecurity.com/blog/sharepoint/sharepoint-2007-development/fault-handling-in-sharepoint-workflows/
Personally I would log it to either a log file or the event log depending on the issue. I think storing it using a users permissions would be a bad idea, what happens if that user does not have the correct rights? or worse still they get elevated permissions by browsing the list in explorer view?
The log file would be the best way, that way you rely only on the file system being available - you dont have to worry about trapping errors happening whilst connecting to the database etc.
Mauro
Add the error to a hidden list with that users name. Set the visibility on the list (for users) to only read/write their own values. Then use a custom web part or FlexListViewer to view the contents of that list and display it to the user. Once they acknowledge that error, remove it from the list.
If necessary, you can add a different workflow action on that message list, that says pause for 2 days and then email. Whatever, depending on your requirements.
Otherwise you can have a custom db table that you use for pretty much the same thing, this way sharepoint does most of the work for you.
Update This can be packaged up as a feature and deployed to each site as needed. The strengths of this approach (adding a list item to a list, querying, alerting a user, and emailing a user) are all built into the sharepoint itself. In this case you can focus on your custom logic only, while letting sharepoint focus on the implementation details.
If you need the user to take some action as a result of the error (e.g. retrying the workflow) is it possible to create a task for that user with information on the error and the location of the workflow?

Resources