api/src/main/java/com/epam/pipeline/manager/security/run/RunPermissionManager.java
public boolean runPermission(final PipelineRun run, final String permissionName) {
        //add assert run not null
        if (permissionsHelper.isOwnerOrAdmin(run.getOwner()) || isRunSshAllowed(run)) {
            return true;
        }
        return inheritPermissions() && Optional.ofNullable(runManager.loadRunParent(run))
                .map(parent -> permissionsHelper.isAllowed(permissionName, parent))
                .orElse(false);
    }
/**
     * Run permissions: owner and admin have full access to PipelineRun
     * @param run
     * @param permissionName
     * @return
     */
Run permissions: owner and admin have full access to PipelineRun
@param run
@param permissionName
@return
Run permissions : owner and admin have full access to PipelineRun @param run @param permissionName @return
public boolean runPermission(final PipelineRun run, final String permissionName) {
        if (permissionsHelper.isOwnerOrAdmin(run.getOwner()) || isRunSshAllowed(run)) {
            return true;
        }
        return inheritPermissions() && Optional.ofNullable(runManager.loadRunParent(run))
                .map(parent -> permissionsHelper.isAllowed(permissionName, parent))
                .orElse(false);
    }
public boolean runPermission ( final PipelineRun run , final String permissionName ) { if ( permissionsHelper . isOwnerOrAdmin ( run . getOwner ( ) ) || isRunSshAllowed ( run ) ) { return true ; } return inheritPermissions ( ) && Optional . ofNullable ( runManager . loadRunParent ( run ) ) . map ( parent -> permissionsHelper . isAllowed ( permissionName , parent ) ) . orElse ( false ) ; }
Run permissions: owner and admin have full access to PipelineRun
 @param run
 @param permissionName
 @return
Run permissions : owner and admin have full access to PipelineRun @param run @param permissionName @return
//add assert run not null