Package org.apache.turbine.util.security

Examples of org.apache.turbine.util.security.AccessControlList


          }

          Map roles = new HashMap();
          Map permissions = new HashMap();

          AccessControlList aclTest =
            TurbineSecurity.getService().getAclInstance(roles, permissions);

          if(aclTest == null)
          {
            fail("Security Service failed to deliver a " + aclClass.getName()
View Full Code Here


        boolean isAuthorized = false;

        /*
         * Get acl and check security.
         */
        AccessControlList acl = data.getACL();

        //if (acl == null || ! acl.hasPermission("default_view", "group"))
        if (acl == null || ! acl.hasRole("turbine_root"))
        {
            isAuthorized = false;
        }
        //else if( acl.hasPermission("default_view", "group"))
        else if(acl.hasRole("turbine_root"))
        {
            isAuthorized = true;
        }

        return isAuthorized;
View Full Code Here

    protected boolean isAuthorized( RunData data throws Exception
    {

        initScreen();
        boolean isAuthorized = false;
        AccessControlList acl = data.getACL();
       
        if (data.getUser().hasLoggedIn())
        {
      if (acl.hasPermission( defModuleName + "_VIEW") || acl.hasRole("turbine_root"))
      {
        isAuthorized = true;
      }
      else
      {
View Full Code Here

    protected boolean isAuthorized( RunData data ) throws Exception
    {
        initScreen();
        boolean isAuthorized = false;

        AccessControlList acl = data.getACL();
       
        if (data.getUser().hasLoggedIn())
        {
      if (acl.hasPermission( defModuleName + "_MODIFY") || acl.hasRole("turbine_root"))
      {
        isAuthorized = true;
      }
      else
      {
View Full Code Here

    protected boolean isAuthorized( RunData data throws Exception
    {

        initScreen();
        boolean isAuthorized = false;
        AccessControlList acl = data.getACL();
       
        if (data.getUser().hasLoggedIn())
        {
          if (acl.hasPermission( defModuleName + "_VIEW") || acl.hasRole("turbine_root"))
          {
        isAuthorized = true;
          }
          else
          {
View Full Code Here

    protected boolean isAuthorized( RunData data ) throws Exception
    {
        int reportid= data.getParameters().getInt("reportid", 0);
        boolean isAuthorized = false;

        AccessControlList acl = data.getACL();
       
        if (reportid>=1 && reportid<=5 && data.getUser().hasLoggedIn() && (acl.hasPermission( "DORDER_VIEW") || acl.hasRole("turbine_root")))
        {
            isAuthorized = true;
        }
        else if (reportid>5 && data.getUser().hasLoggedIn() && ((acl.hasPermission( "DORDER_VIEW") && acl.hasPermission( "DCONTRACT_VIEW")) || acl.hasRole("turbine_root")))
        {
            isAuthorized = true;
        }
        else
        {
View Full Code Here

    {
        if ( data.getUser() != null
//             && data.getUser().getName().length() > 0
             && data.getUser().hasLoggedIn() )
        {
            AccessControlList acl = (AccessControlList)
                data.getSession().getValue(AccessControlList.SESSION_KEY);
            if ( acl == null )
            {
                acl = TurbineSecurity.getACL( data.getUser() );
                data.getSession().putValue( AccessControlList.SESSION_KEY,
View Full Code Here

        /*
         * This is severely lacking [jvz].
         */
        Hashtable roles = new Hashtable();
        Hashtable permissions = new Hashtable();
        return new AccessControlList(roles, permissions);
    }
View Full Code Here

                    groupPermissions.add(rolePermissions);
                }
                // put the Set into permissions(group)
                permissions.put(group, groupPermissions);
            }
            return new AccessControlList(roles, permissions);
        }
        catch(Exception e)
        {
            throw new DataBackendException("Failed to build ACL for user '" +
                                    user.getUserName() + "'" , e);
View Full Code Here

TOP

Related Classes of org.apache.turbine.util.security.AccessControlList

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.