Issues with Permissions/Security implementation
Hello,
I've been attempting to implement security into my module for a couple of days now, and running into issues, which seems to be the norm with the latest version of SF and me.
First off, a bunch of "Comments" permissions are being applied to my module, despite my taking those permission set references out of my module, removing my module from SF, restarting the app, then re-installing the module. There were numerous references to "SecurityConstants.Sets.Comments.SetName" in my supportedPermissionsSets string arrays, which I have since removed, as well as the assignment of the comments permissions from the "SetRootPermissions" method in my modules DataProvider class, but these comments permissions are still showing up. I've removed and reinstalled this module so many times today alone that I've lost count, and I've certainly tried this after removing those references in my solution, but the comments permissions are still showing up.
Secondly, when I had my resourceClassID referenced in my permission names, I was constantly told it could not find the resource class specified. The class is called LocationsResources, and it exists in the Locations namespace. I had defined it as typeof(LocationsResources).Name programtically (which showed in my Security.Config as LocationResources) when passing it to my permissions, but, I kept getting that issue so I finally removed all references to the resource file. Both the key it was looking for "ViewLocations" and the ResourceClassID were accurate, so what might be causing that issue? This issue also came up in the Workflows section, which tells me something must be wrong with my resource class, but I can't tell what. Here's my class decorator:
[ObjectInfo(
typeof
(LocationsResources), ResourceClassId=
"LocationsResources"
, Title =
"LocationResourcesTitle"
, Description =
"LocationResourcesDescription"
)]
public
class
LocationsResources : Resource
No headway on issues 1 or 3, but, issue 2 was caused by the absence of this line in my module's install method:
Res.RegisterResource<LocationsResources>();