Examples of AuthorizationManager


Examples of com.bitmovers.maui.engine.AuthorizationManager

{
  private MFrame frame = new MFrame ("Session Limit Exceeded");
  public SessionLimitExceeded (Object aInitializer)
  {
    super (aInitializer, "Session Limit Exceeded");
    AuthorizationManager theAuth = AuthorizationManager.getInstance ();
    MLabel theLabel =
      new MLabel ("License level does not allow more than " +
            theAuth.getAuthorizationValue (theAuth.AUTHORIZATION_SESSIONS).
              toString () + " sessions");
    frame.add (theLabel);
    MButton theButton = new MButton ("OK");
    theButton.setLink ("http://maui.bitmovers.com");
    theButton.addActionListener (new MActionListener ()
View Full Code Here

Examples of com.ecyrd.jspwiki.auth.AuthorizationManager

     */
    private boolean checkPermission( String permission )
    {
        WikiSession session        = m_wikiContext.getWikiSession();
        WikiPage    page           = m_wikiContext.getPage();
        AuthorizationManager mgr   = m_wikiContext.getEngine().getAuthorizationManager();
        boolean gotPermission     = false;
       
        if ( CREATE_GROUPS.equals( permission ) || CREATE_PAGES.equals( permission )
            || EDIT_PREFERENCES.equals( permission ) || EDIT_PROFILE.equals( permission )
            || LOGIN.equals( permission ) )
        {
            gotPermission = mgr.checkPermission( session, new WikiPermission( page.getWiki(), permission ) );
        }
        else if ( VIEW_GROUP.equals( permission )
            || EDIT_GROUP.equals( permission )
            || DELETE_GROUP.equals( permission ) )
        {
            Command command = m_wikiContext.getCommand();
            gotPermission = false;
            if ( command instanceof GroupCommand && command.getTarget() != null )
            {
                GroupPrincipal group = (GroupPrincipal)command.getTarget();
                String groupName = group.getName();
                String action = "view";
                if( EDIT_GROUP.equals( permission ) )
                {
                    action = "edit";
                }
                else if ( DELETE_GROUP.equals( permission ) )
                {
                    action = "delete";
                }
                gotPermission = mgr.checkPermission( session, new GroupPermission( groupName, action ) );
            }
        }
        else if ( ALL_PERMISSION.equals( permission ) )
        {
            gotPermission = mgr.checkPermission( session, new AllPermission( m_wikiContext.getEngine().getApplicationName() ) );
        }
        else if ( page != null )
        {
            //
            //  Edit tag also checks that we're not trying to edit an
            //  old version: they cannot be edited.
            //
            if( EDIT.equals(permission) )
            {
                WikiPage latest = m_wikiContext.getEngine().getPage( page.getName() );
                if( page.getVersion() != WikiProvider.LATEST_VERSION &&
                    latest.getVersion() != page.getVersion() )
                {
                    return false;
                }
            }

            Permission p = PermissionFactory.getPagePermission( page, permission );
            gotPermission = mgr.checkPermission( session,
                                                  p );
        }
       
        return gotPermission;
    }
View Full Code Here

Examples of com.google.enterprise.connector.spi.AuthorizationManager

  public void testConnectorImplementsRequiredInterfaces() {
    try {
      Connector connector = new AfydConnector(null, "ignored.properties", null);
      Session session = connector.login();
      AuthenticationManager authnManager = session.getAuthenticationManager();
      AuthorizationManager authzManager = session.getAuthorizationManager();
      TraversalManager traversalManager = session.getTraversalManager();
    } catch (ClassCastException cce) {
      Assert.fail(cce.toString());
    } catch (RepositoryException re) {
      // this is OK to throw
View Full Code Here

Examples of com.vmware.vim25.mo.AuthorizationManager

    }
   
    ServiceInstance si = new ServiceInstance(
        new URL(args[0]), args[1], args[2], true);

    AuthorizationManager am = si.getAuthorizationManager();
    AuthorizationDescription ad = am.getDescription();
   
    System.out.println("Descriptions of all privileges:");
    printDescriptions(ad.getPrivilege());

    System.out.println("Descriptions of all privilege groups:");
    printDescriptions( ad.getPrivilegeGroup());

    System.out.println("List of all privileges with details:");
    printPrivileges(am.getPrivilegeList());
   
    System.out.println("List of all the roles with details:");
    printRoles(am.getRoleList());
   
    si.getServerConnection().logout();
  }
View Full Code Here

Examples of de.iritgo.aktera.authorization.AuthorizationManager

      uiRequest.setUserEnvironment(userEnvironment);

      UIController controller = (UIController) KeelContainer.defaultContainer().getSpringBean(controllerId);

      AuthorizationManager authorizationManager = (AuthorizationManager) KeelContainer.defaultContainer()
              .getSpringBean(AuthorizationManager.ID);

      if (! authorizationManager.allowed(controller, controllerId, userEnvironment))
      {
        throw new SecurityException("Controller '" + controllerId + "' not authorized");
      }

      BeanResponse uiResponse = new BeanResponse();
View Full Code Here

Examples of es.ipsa.atril.sec.user.AuthorizationManager

    return new CaptureType(oDms.getDocument(oLst.get(0).id()));
  }

  public void grantAll(AtrilSession oSes)
    throws ElementNotFoundException, NotEnoughRightsException, DmsException, InstantiationException, IllegalAccessException {
    AuthorizationManager oAum = oSes.getAuthorizationManager();
    Dms oDms = oSes.getDms();
    DocumentRights oGrt = RightsFactory.getDocumentRightsAllGrant();
    ArrayList<User> aUsrs = Users.top(oSes).list(oSes);
    Document oCpts = getDocument();
    for (User u : aUsrs) {
      String sNick = u.getNickName();
      if (!sNick.equals("admin")) {
        es.ipsa.atril.sec.user.User oUsr = oAum.getUser(sNick);
        oAum.setDocumentRights(oUsr, oCpts, oGrt);
        for (Document t : oCpts.children()) {
          oAum.setDocumentRights(oUsr, oDms.getDocument(t.id()), oGrt);
          for (Document f : t.children()) {
            oAum.setDocumentRights(oUsr, oDms.getDocument(f.id()), oGrt);
            for (Document s : f.children()) {
              oAum.setDocumentRights(oUsr, oDms.getDocument(s.id()), oGrt);             
            } // next
          } // next
        } // next
      } // fi
    } // next
View Full Code Here

Examples of io.undertow.servlet.api.AuthorizationManager

            }
        }

        final ServletChain servlet = servletRequestContext.getCurrentServlet();
        final Deployment deployment = servletContext.getDeployment();
        final AuthorizationManager authorizationManager = deployment.getDeploymentInfo().getAuthorizationManager();
        return authorizationManager.isUserInRole(role, account, servlet.getManagedServlet().getServletInfo(), this, deployment);
    }
View Full Code Here

Examples of io.undertow.servlet.api.AuthorizationManager

            }
        }

        final ServletChain servlet = servletRequestContext.getCurrentServlet();
        final Deployment deployment = servletContext.getDeployment();
        final AuthorizationManager authorizationManager = deployment.getDeploymentInfo().getAuthorizationManager();
        return authorizationManager.isUserInRole(role, account, servlet.getManagedServlet().getServletInfo(), this, deployment);
    }
View Full Code Here

Examples of io.undertow.servlet.api.AuthorizationManager

            }
        }

        final ServletChain servlet = servletRequestContext.getCurrentServlet();
        final Deployment deployment = servletContext.getDeployment();
        final AuthorizationManager authorizationManager = deployment.getDeploymentInfo().getAuthorizationManager();
        return authorizationManager.isUserInRole(role, account, servlet.getManagedServlet().getServletInfo(), this, deployment);
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.authorization.AuthorizationManager

    public void process(final ProcessMethodContext processMethodContext) {
        FacetUtil.addFacet(createFacet(processMethodContext.getFacetHolder()));
    }

    private AuthorizationFacetImpl createFacet(final FacetHolder holder) {
        final AuthorizationManager authorizationManager = getAuthorizationManager();
        return new AuthorizationFacetImpl(holder, authorizationManager);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.