i have a custom webpart , this webpart needs to be available for all users in site. It has a button which redirects to newform.aspx . Everything works for all users except visitors cannot access the newform.aspx to add items . How is it possible to make this work ?
|
|
Give visitors the ability to add items to the list where the newform resides. You may need to create a custom permission level, break permissions inheritance on the list and apply this custom permission level to the Visitors group. |
|||
|
|
|
By default the visitors group has a Read Only permission level. We need add item permission for adding the items to list, then only the user within that group gets the permission to view newform.aspx and add the item. So, we have to break the permission for the group and associate the contribute (which has add, edit, and delete permissions) Permission level to Visitors Group. |
|||
|
|
|
web.AllowUnsafeUpdates = true; SPList list = web.Lists[adidas.Intranet.MySite.Code.Constants.ListQuickLinks.LISTQUICKLINKS]; list.BreakRoleInheritance(true);
|
|||
|
|