Package org.jasig.portal

Examples of org.jasig.portal.AuthorizationException


    /* (non-Javadoc)
     * @see org.jasig.portal.channels.error.tt.AbstractThrowableToElementTest#supportedThrowable()
     */
    protected Throwable supportedThrowable() {
        return new AuthorizationException("A message");
    }
View Full Code Here


  public void renderXML(ContentHandler out) throws PortalException {

    // first, be sure they are allowed to be here
    if( !managerMode && !passwordChangeMode )
      throw new AuthorizationExceptionMessageFormat.format(
        Constants.ERRMSG_NORIGHTS, new Object[]
          { (String)channelStaticData.getPerson().getAttribute( IPerson.USERNAME ) } ));

    try{
View Full Code Here

               
                final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletWindow.getPortletEntityId());
                final IChannelDefinition channelDefinition = portletDefinition.getChannelDefinition();
               
                if (!ap.canConfigure(channelDefinition.getId())) {
                    throw new AuthorizationException(person.getUserName() + " does not have permission to render '" + channelDefinition.getFName() + "' in " + portletMode + " PortletMode");
                }
            }
           
            portletWindow.setPortletMode(portletMode);
        }
View Full Code Here

    HttpServletResponse response) throws Exception {
   
    /* Make sure the user is an admin. */
    IPerson user = personManager.getPerson(request);
    if(!AdminEvaluator.isAdmin(user)) {
      throw new AuthorizationException("User " + user.getUserName() + " not an administrator.");
    }
   
    String[] entityTypes = request.getParameterValues("entityType");
    String searchTerm = request.getParameter("searchTerm");

View Full Code Here

    }

    EntityIdentifier ei = person.getEntityIdentifier();
      IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
      if (!ap.hasPermission("org.jasig.portal.channels.groupsmanager.CGroupsManager", "VIEW", entityId)) {
      throw new AuthorizationException("User " + person.getUserName() +
          " does not have view permissions on entity " + entityId);
    }


    JsonEntityBean result = groupListHelper.getEntity(entityType, entityId, true);
View Full Code Here

            primAdd(perms);
        }
        catch (Exception ex)
        {
            log.error("Exception adding permissions " + perms, ex);
            throw new AuthorizationException(ex);
        }
    }
}
View Full Code Here

            primAdd(perm, ps);
            if (log.isDebugEnabled())
                log.debug("RDBMPermissionImpl.add(): " + ps);
            rc = ps.executeUpdate();
            if ( rc != 1 )
                { throw new AuthorizationException("Problem adding Permission " + perm); }
        }
        finally
            { ps.close(); }
    }
    catch (Exception ex)
    {
        log.error("Exception adding permission [" + perm + "]", ex);
        throw new AuthorizationException("Problem adding Permission " + perm);
    }
    finally
        { RDBMServices.releaseConnection(conn); }
}
View Full Code Here

            primDelete(perms);
        }
        catch (Exception ex)
        {
            log.error("Exception deleting permissions " + Arrays.toString(perms), ex);
            throw new AuthorizationException("Exception deleting permissions " + Arrays.toString(perms), ex);
        }
    }
}
View Full Code Here

            { ps.close(); }
    }
    catch (Exception ex)
    {
        log.error("Exception deleting permission [" + perm + "]", ex);
        throw new AuthorizationException("Problem deleting Permission " + perm, ex);
    }
    finally
        { RDBMServices.releaseConnection(conn); }
}
View Full Code Here

    }
    catch (Exception ex)
    {
        log.error("Exception determining whether " +
                "permission [" + perm + "] exists in database.", ex);
        throw new AuthorizationException("RDBMPermissionImpl.existsInDatabase(): " + ex);
    }
    finally
    {
        RDBMServices.releaseConnection(conn);
    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.AuthorizationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.