Home » Microsoft » 70-488 » Which code segment should you add at line UA11?
You need to set the appropriate permission levels. A variable named customRole references Wholesale.
Which code segment should you add at line UA11?
A. customRole.BasePermissions = SPBasePermissions.ViewPages;
B. customRole.BasePermissions = _permissions | SPBasePermissions.ViewFormPages;
C. customRole.BasePermissions = SPBasePermissions.EmptyMask | SPBasePermissions.ViewPages;
D. customRole.BasePermissions = _permissions | SPBasePermissions.ViewPages;
Correct Answer: D
Explanation/Reference:
* ViewPages, View pages in a Web site.
* Scenario: A custom role named Wholesale must be created. Wholesale customers must be assigned to this role in order to view the promotions page.
Incorrect:
Not A, not C: The previous line, UA10, is: _permissions = this.GetExistingPermissions(); We should add this permission and the ViewPages permission.
Not B: ViewFormPages View forms, views, and application pages, and enumerate lists.
Reference: SPBasePermissions enumeration
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx