Examples of Principal


Examples of org.apache.harmony.tools.policytool.model.Principal

    @Override
    public void onOkButtonPressed() {
        // TODO: validation

        final Principal principal = initialPrincipal == null ? new Principal() : initialPrincipal;

        principal.setType( principalTypeTextField.getText() );
        principal.setName( principalNameTextField.getText() );

        if ( initialPrincipal == null ) {
            principalList.add( principal );
            listModel.addElement( principal );
        } else
View Full Code Here

Examples of org.apache.wicket.security.hive.authorization.Principal

  {
    Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
    Collection<GrantedAuthority> authorities = authentication.getAuthorities();
    if (authorities != null)
    {
      Principal principal;
      for (GrantedAuthority curAuthority : authorities)
      {
        principal = convert(curAuthority);
        if (principal != null)
          addPrincipal(principal);
View Full Code Here

Examples of org.candlepin.auth.Principal

    }

    @Override
    public Principal get() {
        TestPrincipalProviderSetter principalSingleton = TestPrincipalProviderSetter.get();
        Principal principal = principalSingleton.getPrincipal();
        if (principal == null) {
            List<Permission> permissions = new ArrayList<Permission>();
            permissions.add(new OwnerPermission(new Owner(OWNER_NAME), Access.ALL));

            principal = new UserPrincipal("Default User", permissions, true);
View Full Code Here

Examples of org.eurekastreams.commons.actions.context.Principal

     */
    @Test
    public void testPublicGroupDestinationActivityPostSuccessfulAuthorization()
    {
        PostActivityRequest currentRequest = new PostActivityRequest(testActivity);
        Principal currentPrincipal = new DefaultPrincipal(ACCOUNT_ID, OPENSOCIAL_ID, ID);
        ServiceActionContext currentActionContext = new ServiceActionContext(currentRequest, currentPrincipal);

        final Set<Long> groupCoords = new HashSet<Long>();
        groupCoords.add(ID);

View Full Code Here

Examples of org.exist.security.Principal

                throw new XPathException("Unknown function");
            }
        } else {
            final SecurityManager securityManager = broker.getBrokerPool().getSecurityManager();
            final String strPrincipal = args[0].getStringValue();
            final Principal principal;
            if(isCalledAs(qnGetAccountMetadataKeys.getLocalName()) || isCalledAs(qnGetAccountMetadata.getLocalName())) {
                if(!currentUser.hasDbaRole() && !currentUser.getUsername().equals(strPrincipal)) {
                    throw new XPathException("You must be a DBA to retrieve metadata about other users, otherwise you may only retrieve metadata about yourself.");
                }
                principal = securityManager.getAccount(strPrincipal);
View Full Code Here

Examples of org.jasig.cas.authentication.principal.Principal

        assertTrue(credentials.toString().contains("unknown"));
    }
   
    public void testToStringWithPrincipal() {
        final SpnegoCredentials credentials = new SpnegoCredentials(new byte[] {});
        final Principal principal = new SimplePrincipal("test");
        credentials.setPrincipal(principal);
        assertEquals("test", credentials.toString());
    }
View Full Code Here

Examples of org.jasig.portal.api.Principal

          // Activity
          IPermissionActivity activity = permissionOwnerDao.getPermissionActivity(permission.getOwner(), permission.getActivity());
          Activity activityImpl = new ActivityImpl(permission.getActivity(), activity.getName());
         
          // Principal
          Principal principalImpl = new PrincipalImpl(authP.getKey(), authP.getPrincipalString());
         
          // Target
          Target targetImpl = null// default
          IPermissionTargetProvider targetProvider = targetProviderRegistry.getTargetProvider(activity.getTargetProviderKey());
          IPermissionTarget target = targetProvider.getTarget(permission.getTarget());
View Full Code Here

Examples of org.jayasoft.woj.common.model.Principal

   * @param ident id as string
   * @return a Principal object whom Id is ident or null.
   */
  public static Principal getPrincipal(String ident) {
    LOGGER.debug("Resolving principal ident: " + ident);
    Principal result = null;
    // look for ident in User table
    result = (Principal)WOJServer.getInstance().getDataService().getUserDao().getUserById(Long.valueOf(ident));
    if (result == null) {
      // No user known for this ident, look for Group
      result = (Principal)WOJServer.getInstance().getDataService().getGroupDao().getGroup(ident);
View Full Code Here

Examples of org.jboss.as.console.client.administration.role.model.Principal

                // Skip the local user
                return null;
            }

            Principal.Type type = Principal.Type.valueOf(node.get("type").asString());
            Principal principal = new Principal(type, name);
            principals.add(principal);

            String realm = null;
            if (node.hasDefined("realm")) {
                realm = node.get("realm").asString();
View Full Code Here

Examples of org.jdesktop.wonderland.modules.security.common.Principal

        // add the current user as an owner
        ServerSessionManager primarySM = LoginManager.getPrimary();
        if (primarySM != null) {
            WonderlandSession primarySession = primarySM.getPrimarySession();
            if (primarySession != null) {
                Principal owner = new Principal(
                        primarySession.getUserID().getUsername(),
                        Principal.Type.USER);
                perms.getOwners().add(owner);
            }
        }

        // add view permissions for all users
        Principal p = new Principal("users", Principal.Type.EVERYBODY);
        ActionDTO view = new ActionDTO(new ViewAction());
        perms.getPermissions().add(new Permission(
                p, view, Permission.Access.GRANT));
        ActionDTO modify = new ActionDTO(new ModifyAction());
        perms.getPermissions().add(new Permission(
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.