Package org.jasig.portal

Examples of org.jasig.portal.AuthorizationException


            throws ServletException {

        // Verify that the user is allowed to use this service
        IPerson user = personManager.getPerson(req);
        if(!AdminEvaluator.isAdmin(user)) {
            throw new AuthorizationException("User " + user.getUserName() + " not an administrator.");
        }

        Map<String,Document> fragmentLayoutMap = null;
        if (userLayoutStore != null) {
            try {
View Full Code Here


                            "THIS MAY BE AN ATTEMPT TO EXPLOIT A HISTORICAL SECURITY FLAW.  " +
                            "You should probably figure out who this user is and why they are trying to access " +
                            "unauthorized portlet modes.",
                            person.getUserName(), portletDefinition.getFName(), portletMode);

                    throw new AuthorizationException(person.getUserName() + " does not have permission to render '" +
                            portletDefinition.getFName() + "' in " + portletMode + " PortletMode.");
                }
            }
        }
    }
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

                    if ( rc != 1 )
                    {
                        String errMsg = "Problem adding " + perms[i] + " RC: " + rc;
                        log.error( errMsg);
                        RDBMServices.rollback(conn);
                        throw new AuthorizationException(errMsg);
                    }
                }
            }
            finally
            { ps.close(); }
View Full Code Here

                    { perms.add(instanceFromResultSet(rs)); }
                } finally { rs.close(); }
            } finally { stmt.close(); }
        } catch (SQLException sqle) {
            log.error("Problem retrieving permissions", sqle);
            throw new AuthorizationException("Problem retrieving Permissions [" + sqle.getMessage() + "] for query=[" + query +
                    "] for owner=[" + owner + "] and principal=[" + principal + "] and activity=[" + activity +
                    "] and target=[" + target + "] and type=[" + type + "]", sqle);
        } finally { RDBMServices.releaseConnection(conn); }

        if (log.isTraceEnabled()) {
View Full Code Here

                primUpdate(perms);
            }
            catch (Exception ex)
            {
                log.error("Exception updating permissions " + perms, ex);
                throw new AuthorizationException(ex);
            }
        }
    }
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.