locked
Disable "Delete All Versions" from Versions.aspx RRS feed

  • Question

  • Friends -

    I want to disable Delete All Versions option from the Version History (Versions.aspx) page. Is this acheivable and i also want to disable the Restore and Delete options from the document/list items. This should be for all the users, i want to do this because i don't want all the users to delete or restore the versions. Let me know if you need more information about this.

    Thanks in advance,

    Ashwani

    Tuesday, April 30, 2013 5:12 AM

Answers

  • There are specific permissions for Versions within SP2007 permission groupings.  Under the List Permissions,  there are "View Versions" and "Delete Versions" permissions.  There isn't a specific permission to restore versions as I believe that this is tied to the "Add Items" permission.

    Is setting everyone to read only an option, whilst retaining Edit permissions for the required people?


    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/

    Tuesday, April 30, 2013 10:32 AM
    Answerer
  • Thanks Steven !!

    I programmatically removed those two permissions, which you have mentioned above using below code :

    var oContributeRoleDefination = SPWeb.RoleDefinitions["Contribute"];

    var oDesignRoleDefination = SPWeb.RoleDefinitions["Design"];

    oContributeRoleDefination.BasePermissions |= SPBasePermissions.DeleteVersions;

    oContributeRoleDefination.BasePermissions ^= SPBasePermissions.DeleteVersions;

    oContributeRoleDefination.Update();

    oDesignRoleDefination.BasePermissions |= SPBasePermissions.DeleteVersions;

    oDesignRoleDefination.BasePermissions ^= SPBasePermissions.DeleteVersions;

    oDesignRoleDefination.Update();

    SPWeb.Update();

    Let me know if there is a better way to do this.

    Please mark if it is useful.

    Thanks,
    Ashwani Vashishtha

    Tuesday, July 16, 2013 7:16 AM

All replies

  • There are specific permissions for Versions within SP2007 permission groupings.  Under the List Permissions,  there are "View Versions" and "Delete Versions" permissions.  There isn't a specific permission to restore versions as I believe that this is tied to the "Add Items" permission.

    Is setting everyone to read only an option, whilst retaining Edit permissions for the required people?


    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/

    Tuesday, April 30, 2013 10:32 AM
    Answerer
  • Thanks Steven !!

    I programmatically removed those two permissions, which you have mentioned above using below code :

    var oContributeRoleDefination = SPWeb.RoleDefinitions["Contribute"];

    var oDesignRoleDefination = SPWeb.RoleDefinitions["Design"];

    oContributeRoleDefination.BasePermissions |= SPBasePermissions.DeleteVersions;

    oContributeRoleDefination.BasePermissions ^= SPBasePermissions.DeleteVersions;

    oContributeRoleDefination.Update();

    oDesignRoleDefination.BasePermissions |= SPBasePermissions.DeleteVersions;

    oDesignRoleDefination.BasePermissions ^= SPBasePermissions.DeleteVersions;

    oDesignRoleDefination.Update();

    SPWeb.Update();

    Let me know if there is a better way to do this.

    Please mark if it is useful.

    Thanks,
    Ashwani Vashishtha

    Tuesday, July 16, 2013 7:16 AM