Package org.ejbca.core.model.authorization

Examples of org.ejbca.core.model.authorization.AuthorizationDeniedException


      publishersession.removePublisher(administrator, name);
      this.info.publishersEdited();
      returnval = false;
       
      }else {
        throw new AuthorizationDeniedException("Not authorized to remove publisher.");
      }
       
      return returnval;         
    }
View Full Code Here


    public void renamePublisher(String oldname, String newname) throws PublisherExistsException, AuthorizationDeniedException{
     if(authorizedToEditPublishers()){   
    publishersession.renamePublisher(administrator, oldname,newname);
     this.info.publishersEdited();
     }else {
       throw new AuthorizationDeniedException("Not authorized to rename publisher");
     }
    }
View Full Code Here

    public void clonePublisher(String originalname, String newname) throws AuthorizationDeniedException{        
      if(authorizedToEditPublishers()){
        publishersession.clonePublisher(administrator, originalname,newname);
        this.info.publishersEdited();
      }else {
         throw new AuthorizationDeniedException("Not authorized to clone publisher");
      }
    }
View Full Code Here

   
    public void testConnection(String name) throws PublisherConnectionException, AuthorizationDeniedException{        
      if(authorizedToPublisherName(name)){
        publishersession.testConnection(administrator, publishersession.getPublisherId(administrator, name));       
      }else {
        throw new AuthorizationDeniedException("Not authorized to clone publisher");
      }
    }       
View Full Code Here

    }       
   
      /** Method to get a reference to a publisher.*/
    public BasePublisher getPublisher(int id) throws AuthorizationDeniedException{
      if(!authorizedToPublisherId(id)) {
        throw new AuthorizationDeniedException("Not authorized to publisher");
      }
     
      return publishersession.getPublisher(administrator, id);
    }     
View Full Code Here

      return publishersession.getPublisher(administrator, id);
    }     
         
    public BasePublisher getPublisher(String name) throws AuthorizationDeniedException{
     if(!authorizedToPublisherName(name)) {
        throw new AuthorizationDeniedException("Not authorized to publisher");
     }
        
      return publishersession.getPublisher(administrator, name);
    }
View Full Code Here

    public UserView findUserForEdit(String username) throws AuthorizationDeniedException {
      UserView userview = null;
      UserDataVO user = userAdminSession.findUser(administrator, username);
      if (this.informationmemory.getGlobalConfiguration().getEnableEndEntityProfileLimitations()) {
        if (!endEntityAuthorization(administrator, user.getEndEntityProfileId(),AccessRulesConstants.EDIT_RIGHTS, false)) {
          throw new AuthorizationDeniedException("Not authorized to edit user.");
        }
      }
      if (user != null) {
        userview = new UserView(user, informationmemory.getCAIdToNameMap());
      }
View Full Code Here

    }

    public boolean authorizedToViewHardToken(String username) throws AuthorizationDeniedException {
      int profileid = userAdminSession.findUser(administrator, username).getEndEntityProfileId();
      if (!endEntityAuthorization(administrator, profileid, AccessRulesConstants.HARDTOKEN_RIGHTS, false)) {
        throw new AuthorizationDeniedException();
      }
      if (!WebConfiguration.getHardTokenDiplaySensitiveInfo()) {
        return false;
      }
      return endEntityAuthorization(administrator, profileid, AccessRulesConstants.HARDTOKEN_PUKDATA_RIGHTS, false);
View Full Code Here

    public void addEndEntityProfile(String name, EndEntityProfile profile) throws EndEntityProfileExistsException, AuthorizationDeniedException {
      if(authorizedToProfile(profile, true)){
          endEntityProfileSession.addEndEntityProfile(administrator, name, profile);
        this.info.endEntityProfilesEdited();
      }else {
        throw new AuthorizationDeniedException("Not authorized to add end entity profile");
      }
    }
View Full Code Here

    public void changeEndEntityProfile(String name, EndEntityProfile profile) throws AuthorizationDeniedException{
      if(authorizedToProfile(profile, true)){
          endEntityProfileSession.changeEndEntityProfile(administrator, name,profile);  
        this.info.endEntityProfilesEdited();
      }else {
        throw new AuthorizationDeniedException("Not authorized to edit end entity profile");
      }
    }
View Full Code Here

TOP

Related Classes of org.ejbca.core.model.authorization.AuthorizationDeniedException

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.