Permission Level... - InfoPath Dev
in

InfoPath Dev

Permission Level...

Last post 11-02-2011 02:28 AM by Karsten Brocksieper. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-20-2011 03:47 PM

    Permission Level...

    Hello,

    for some reasons I have the requirement that I have to allow users to fill out forms and submit this forms in a form library but they may NOT !!! see any other content in the library (not even their own submission). Now I have thought that I can add a new permission level in this site and choose only the 'Add item' permission. But --- when creating a custom permission level from within SharePoint, selecting Add Items automatically selects View Items. Unchecking View Items unchecks the Add Items. So there seems to be no way to have only the Add Items permission without the View Items permission.

    Does anyone know a way to allow users to submit to a form library --- but they may not allowed to see any other forms (not even their own).

    Thank you very much for any help.

    Regards,

    Karsten
  • 10-20-2011 03:51 PM In reply to

    Wow, that's a sticky one. Hopefully someone else has a better idea - but what about workflow? On submit, move the XML to a different library?

    Hilary Stoupa

  • 10-20-2011 04:42 PM In reply to

    You could create a view and add some code to redirect the user if they try to navigate to it and make it the default view? If not I would build a simple work flow that does what Hilary suggested to copy the file to a new library and then delete the form that was submitted. Essentially a staging Form Library. SharePoint Designer can easily do this.
  • 11-02-2011 02:28 AM In reply to

    Hello,

    it´s a long time ago --- but in the meantime I have found a solution. You can´t achieve this by only using the 'Graphical User Interface'. You can, however, achieve this by using code within a console application. The console application should take three arguments: the site collection URL, the name of the permission, and a description. These are the required variables for the permission code as shown in the following listing.

    string siteCollectionURL = args[0];

    string nameOfPermissionLevel = args[1];

    string description = args[2];

    using (SPSite oSiteCollection = new SPSite(siteCollectionURL))

    {

    using (SPWeb oWebsite = oSiteCollection.OpenWeb())

    {

    if (!oWebsite.HasUniqueRoleDefinitions)

    {

    oWebsite.RoleDefinitions.BreakInheritance(true, true);

    }

    SPRoleDefinition oRoleDefinition = new SPRoleDefinition();

    oRoleDefinition.Name = nameOfPermissionLevel;

    oRoleDefinition.Description = description;

    oRoleDefinition.BasePermissions = SPBasePermissions.AddListItems &

    SPBasePermissions.ViewFormPages & SPBasePermissions.UseClientIntegration;

    oWebsite.RoleDefinitions.Add(oRoleDefinition);

    }

    }

    After you have compiled this you can create the new permission level with the following command:

    createpermissionlevel.exe 'http://YourSiteCollection' 'Submit Only' 'Submit only permission level”

     

    Hope that helps anyone.

     

    Regards,

    Karsten
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.