Liferay 6.1.2-ce-ga3

com.liferay.portal.verify
Class VerifyPermission

java.lang.Object
  extended by com.liferay.portal.kernel.dao.db.BaseDBProcess
      extended by com.liferay.portal.verify.VerifyProcess
          extended by com.liferay.portal.verify.VerifyPermission
All Implemented Interfaces:
DBProcess, ResourceConstants

public class VerifyPermission
extends VerifyProcess
implements ResourceConstants


Field Summary
 
Fields inherited from class com.liferay.portal.verify.VerifyProcess
ALWAYS, NEVER, ONCE
 
Fields inherited from interface com.liferay.portal.model.ResourceConstants
PRIMKEY_DNE, SCOPE_COMPANY, SCOPE_GROUP, SCOPE_GROUP_TEMPLATE, SCOPE_INDIVIDUAL, SCOPES
 
Constructor Summary
VerifyPermission()
           
 
Method Summary
protected  void checkPermissions()
           
protected  void deleteDefaultPrivateLayoutPermissions_1to4(long companyId)
           
protected  void deleteDefaultPrivateLayoutPermissions_5(long companyId)
           
protected  void deleteDefaultPrivateLayoutPermissions_6(long companyId)
           
protected  void deleteDefaultPrivateLayoutPermissions()
           
protected  void doVerify()
           
protected  void fixLayoutRolePermissions_6()
          Fixes the case where layouts are missing the required owner role permissions.
protected  void fixLayoutRolePermissions_6(long companyId, String primKey, long ownerRoleId, String[] actionIds)
           
protected  void fixLayoutRolePermissions()
           
protected  void fixOrganizationRolePermissions_5()
           
protected  void fixOrganizationRolePermissions_6()
           
protected  void fixOrganizationRolePermissions()
           
protected  boolean hasPermission(String actionId, long resourceId)
           
protected  boolean hasResourcePermission(long companyId, String primKey, long roleId)
           
protected  boolean isPrivateLayout(String name, String primKey)
           
protected  void processPermissions(Resource resource, List<Permission> permissions)
           
 
Methods inherited from class com.liferay.portal.verify.VerifyProcess
getBuildNumber, getPortalTableNames, isPortalTableName, verify, verify
 
Methods inherited from class com.liferay.portal.kernel.dao.db.BaseDBProcess
runSQL, runSQL, runSQLTemplate, runSQLTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerifyPermission

public VerifyPermission()
Method Detail

checkPermissions

protected void checkPermissions()
                         throws Exception
Throws:
Exception

deleteDefaultPrivateLayoutPermissions

protected void deleteDefaultPrivateLayoutPermissions()
                                              throws Exception
Throws:
Exception

deleteDefaultPrivateLayoutPermissions_1to4

protected void deleteDefaultPrivateLayoutPermissions_1to4(long companyId)
                                                   throws Exception
Throws:
Exception

deleteDefaultPrivateLayoutPermissions_5

protected void deleteDefaultPrivateLayoutPermissions_5(long companyId)
                                                throws Exception
Throws:
Exception

deleteDefaultPrivateLayoutPermissions_6

protected void deleteDefaultPrivateLayoutPermissions_6(long companyId)
                                                throws Exception
Throws:
Exception

doVerify

protected void doVerify()
                 throws Exception
Overrides:
doVerify in class VerifyProcess
Throws:
Exception

fixLayoutRolePermissions

protected void fixLayoutRolePermissions()
                                 throws Exception
Throws:
Exception

fixLayoutRolePermissions_6

protected void fixLayoutRolePermissions_6()
                                   throws Exception
Fixes the case where layouts are missing the required owner role permissions. This can happen when upgrading from permission algorithms 1, 2, 3, and 4 to algorithm 6. This method will check for the presence of the owner role's resource permission for all layouts. The resource permission will be created if it does not exist. Both existing or newly created resource permission default action IDs for owner role are checked. If owner permissions for default action ID is missing, then the permission is given to the owner. See LPS-26191.

Throws:
Exception

fixLayoutRolePermissions_6

protected void fixLayoutRolePermissions_6(long companyId,
                                          String primKey,
                                          long ownerRoleId,
                                          String[] actionIds)
                                   throws Exception
Throws:
Exception

fixOrganizationRolePermissions

protected void fixOrganizationRolePermissions()
                                       throws Exception
Throws:
Exception

fixOrganizationRolePermissions_5

protected void fixOrganizationRolePermissions_5()
                                         throws Exception
Throws:
Exception

fixOrganizationRolePermissions_6

protected void fixOrganizationRolePermissions_6()
                                         throws Exception
Throws:
Exception

hasPermission

protected boolean hasPermission(String actionId,
                                long resourceId)
                         throws Exception
Throws:
Exception

hasResourcePermission

protected boolean hasResourcePermission(long companyId,
                                        String primKey,
                                        long roleId)
                                 throws Exception
Throws:
Exception

isPrivateLayout

protected boolean isPrivateLayout(String name,
                                  String primKey)
                           throws Exception
Throws:
Exception

processPermissions

protected void processPermissions(Resource resource,
                                  List<Permission> permissions)
                           throws Exception
Throws:
Exception

Liferay 6.1.2-ce-ga3