i check if current user has permissions update journal article. so, call journalarticlepermission.check() custom portlet, class journalarticlepermission not reachable portlet's class loader.
calling
return permissionchecker.haspermission(groupid, jaclassname, resourceprimkey, actionkeys.update);
works bypasses staging logic implemented in helper class.
what's clean way check permissions on journal article ?
the same question posted here on liferay forums, not convinced answers proposed, i.e. using portalclassinvoker
.
there seems no real "clean" way that.
the permission helper classes part of portal-impl package, can't used in custom portlet directly, discussed in this thread on liferay forums, valuable input harish kumar , david h nebinger.
the options are:
copy-paste logic core helper classes, obvious consequences on maintenance
bypass helper code , go directly lower level checks, leaving aside potentially valuable checks (such staging permissions).
Comments
Post a Comment