views:

32

answers:

2

I am an experienced developer, but new to SP. I have a calendar that only certain users can add/edit/delete events to, but each user should only be allowed to add/edit/delete their own content. I've created my own list of Categories in the "Category" list on my site. At the most primitive level, I'd like to modify the add and edit forms to auto-select the category and then disable that dropdown.

Once I can figure out how to do that, I can figure the rest out. I have discovered that I can't use server side code blocks such as <% %>, unless I'm missing out on a setting or something.

I saw something (the link has eluded me) that mentioned something about aggregated calendars? As in, each user will basically have their own calendar (via subsites) and then the main site will aggregate those?

I've scoured the interwebz and have not yet come up with an answer. Any information will help. Thank you SO community!

+1  A: 

You are asking for several things here... In general, a Calendar is a SharePoint list and security is generally managed at the list level. So a user who can add and edit calendar can add and edit all calendar items. To bypass this you will need to implement item level security, which greatly increases complexity of your application and I tend to shy away from. If you chose to do this approach, there are itemAdding and itemUpdating events that fire when an item is changed. You would then programatically update the security for each item as it's modified.

With SharePoint 2010 you can modify your edit and add forms using SharePoint designer relatively easy. However, you are correct about the code blocks. There is a setting in the web.config under the PageParsepaths node which needs to be updated to allow for the executing of code blocks. More info here. From a security perspective this is generally bad practice because you are giving your users the ability to edit the page, they could then input malicious code script that could run on your site. From a SharePoint perspective, usually you would create a User Control (ASCX file) that lives on the server to bypass this issue. You can then embedd the ASCX file and the code blocks will execute fine. Most of the SharePoint files on in the SharePoint application directory use that approach and you can use one of them as a template. There are other ways to like Web parts, etc

Babmboo Solutions has a Calendar web part that allows for roll up. While I have not tried it, I would investigate using OTB functionality with the Content Query Web part to aggregate the data together and see if that moves you along to where you would like to be.

John Ptacek
+1  A: 

In SP 2010 you can add up to 10 Calendar as overlays for the current calandar view.

From the ribbon select Calendar Tab and then in the Manage Views Segment select the Calendars Overlay option.

You can then select New Calendar option to add calendars that will be used for overlayes.

The New Calendar button will bring up A number of options

Note

Calendar Name: is just the name of the Overlay Web URL: points to the url of the Site where the calendar sits. You need to hit the Resolve button to populate the Lists and List View Dropdowns.

You could creat 10 seprate calandars with the relevant user permisions and then use the Overlays to show them all together.

JC Vivian
I have used the "Resolve" button and received this message: "Unable to find specified web in the given URL"
Honus Wagner
The URl should point to the Site that the calendar belongs to and not the calendar its self. E.G. http.://test/Subsite for a calendar in the subsite
JC Vivian