Package org.apache.slide.security

Examples of org.apache.slide.security.AccessDeniedException


                throw new WebdavException(WebdavStatus.SC_BAD_REQUEST);
            }
            catch (AccessDeniedException e) {
               
                String contextPath = req.getContextPath() ;
                AccessDeniedException ade = new AccessDeniedException
                    (contextPath + e.getObjectUri(),
                     contextPath + e.getSubjectUri(),
                     contextPath + e.getActionUri());
               
                String msg = ade.getMessage();
                resp.setStatus(WebdavStatus.SC_FORBIDDEN);
                resp.setContentType (TEXT_XML_UTF_8);
                createErrorResult (SearchQueryResult.STATUS_FORBIDDEN, msg);
                throw new WebdavException(WebdavStatus.SC_FORBIDDEN);
            }
View Full Code Here


                throw new WebdavException(WebdavStatus.SC_BAD_REQUEST);
            }
            catch (AccessDeniedException e) {
               
                String contextPath = getSlideContextPath();
                AccessDeniedException ade = new AccessDeniedException
                    (contextPath + e.getObjectUri(),
                     contextPath + e.getSubjectUri(),
                     contextPath + e.getActionUri());
               
                String msg = ade.getMessage();
                resp.setStatus(WebdavStatus.SC_FORBIDDEN);
                resp.setContentType (TEXT_XML_UTF_8);
                createErrorResult (SearchQueryResult.STATUS_FORBIDDEN, msg);
                throw new WebdavException(WebdavStatus.SC_FORBIDDEN);
            }
View Full Code Here

                throw new WebdavException(WebdavStatus.SC_BAD_REQUEST);
            }
            catch (AccessDeniedException e) {
               
                String contextPath = req.getContextPath() ;
                AccessDeniedException ade = new AccessDeniedException
                    (contextPath + e.getObjectUri(),
                     contextPath + e.getSubjectUri(),
                     contextPath + e.getActionUri());
               
                String msg = ade.getMessage();
                resp.setStatus(WebdavStatus.SC_FORBIDDEN);
                resp.setContentType (TEXT_XML_UTF_8);
                createErrorResult (SearchQueryResult.STATUS_FORBIDDEN, msg);
                throw new WebdavException(WebdavStatus.SC_FORBIDDEN);
            }
View Full Code Here

                    else
                    {
                        if(log.isDebugEnabled())
                            log.debug("event update denied: " + event2);
                        insertList.add(event2);
                        throw new AccessDeniedException(calendar.getName(),user.getUserName(),"WRITE");
                    }
                }
                else
                {
                    if(log.isInfoEnabled())
                        log.info("event " + event.getId() + " not found, id incorrect?");
                }
            }
            else
            {     
                // create new Event, no eventid found
                if(EntityAccessUtility.isAccessGranted(user,calendar,Access.WRITE))
                {
                    EventCalendarVO ecvo = new EventCalendarVO(event,calendar);
                    ecvo.setParticipiantType(ParticipiantType.HOST);
                    ecvo.setInvitationStatus(InvitationStatus.ACCEPTED);
                   
                    ecvo.setOwnerUser(calendar.getOwnerUser());
                    ecvo.setOwnerGroup(calendar.getOwnerGroup());
                    ecvo.setAccessUser(calendar.getAccessUser());
                    ecvo.setAccessGroup(calendar.getAccessGroup());
                    ecvo.setAccessGlobal(calendar.getAccessGlobal());
                   
                    event.getEventCalendars().add(ecvo);
                   
                    if(log.isDebugEnabled())
                        log.debug("new event created: " + event);
                   
                    eventdao.insert(event);
                    insertList.add(event);
                                      
                }
                else
                {
                    if(log.isDebugEnabled())
                        log.debug("create event denied: " + event);
                   
                    insertList.add(event);
                    throw new AccessDeniedException(calendar.getName(),user.getUserName(),"WRITE");
                }   
            }     
        }
       
        if(handling == EventHandling.DELETE// deleting events not in insertList
View Full Code Here

    /**
     * not allowed, thows always an AccessDebiedException
     */
    public void createFolder(String folderUri) throws AccessDeniedException
    {    
        throw new AccessDeniedException(folderUri, "create folder", "create");
    }
View Full Code Here

    /**
     * not allowed, thows always an AccessDeniedException
     */
    public void createResource(String resourceUri) throws AccessDeniedException
    {   
        throw new AccessDeniedException(resourceUri, "create file", "create");
    }
View Full Code Here

    /**
     * not allowd, throws always a AccessDeniedExceltion
     */
    public void removeObject(String uri) throws AccessDeniedException
    {    
        throw new AccessDeniedException(uri,"", "delete");
    }
View Full Code Here

                throw new WebdavException(WebdavStatus.SC_BAD_REQUEST);
            }
            catch (AccessDeniedException e) {
               
                String contextPath = req.getContextPath() ;
                AccessDeniedException ade = new AccessDeniedException
                    (contextPath + e.getObjectUri(),
                     contextPath + e.getSubjectUri(),
                     contextPath + e.getActionUri());
               
                String msg = ade.getMessage();
                resp.setStatus(WebdavStatus.SC_FORBIDDEN);
                resp.setContentType (TEXT_XML_UTF_8);
                createErrorResult (SearchQueryResult.STATUS_FORBIDDEN, msg);
                throw new WebdavException(WebdavStatus.SC_FORBIDDEN);
            }
View Full Code Here

TOP

Related Classes of org.apache.slide.security.AccessDeniedException

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.