permissions - Why does hasPermission require both name and primKey? -
liferay's haspermission method requires among others name
, primkey
:
boolean haspermission(long groupid, string name, long primkey, string actionid)
here documentation these 2 parameters:
name - resource's name, can either class name or portlet id primkey - primary key of resource
is same resource?
if yes, why not ask primkey
?
in addition pankaj kathiriya's comment (primkey not uuid, there might many objects have same primary key - it's long
typically. note permission checks done on resource
entities - primary key composed of name (string
) , primkey (typically long
)
this used (not sure if it's done) have sanity check action name: implementation check if given object class declares action @ all, , flag implementation bugs if not.
Comments
Post a Comment