/* === aci for WebOTX Portal === */
*,@companydn@
/* other company user cannot access this company */
  {
    ENTRY(*) ACCESS
      BY anyuser WITH AUTHLEVEL=protect PERMIT TO NONE
    PRIORITY=min
    ACITAG='Portal grant entry access for anyuser'
  }

  {
    ENTRY(*U) ACCESS
      BY user='*,ou=people,@companydn@'
    WITH AUTHLEVEL=protect PERMIT TO search,disclose
    PRIORITY=min
    ACITAG='Portal grant entry access for anyuser'
  }

  {
    ENTRY(*U) ACCESS
      BY self  WITH AUTHLEVEL=protect  PERMIT TO search,disclose
    PRIORITY=50
    ACITAG='Portal grant entry search for this entry'
  }
  {
    ENTRY(*U) ACCESS
      BY user='*,ou=people,@companydn@'
        ,filter='(&(assignedRole=OTXPORTAL_COMPANY_ADMIN)(objectClass=otxUser))'
          WITH AUTHLEVEL=protect  PERMIT TO update,export,import,rename
    PRIORITY=255
    ACITAG='Portal grant entry update for Portal Company Admin'
  }
  {
    ENTRY(*U) ACCESS
      BY self  WITH AUTHLEVEL=protect  PERMIT TO NotUpdate,NotExport,NotImport,NotRename
    PRIORITY=100
    ACITAG='Portal deny entry update for this entry'
  }
  {
    ENTRY(userpassword:,userpassword=*) ACCESS
      BY self  WITH AUTHLEVEL=protect  PERMIT TO update
    PRIORITY=101
    ACITAG='Portal grant userpassword update for this entry'
  }
  {
    ATTR(portalpersonalization:,portalpersonalization=*) ACCESS
      BY anyuser  WITH AUTHLEVEL=protect  PERMIT TO NotUpdate
    PRIORITY=170
    ACITAG='Portal deny update portalpersonalization for anyuser'
  }
  {
    ATTR(portalpersonalization:,portalpersonalization=*) ACCESS
      BY user='*,ou=people,@companydn@'
        ,filter='(&(assignedRole=OTXPORTAL_COMPANY_ADMIN)(objectClass=otxUser))'
          WITH AUTHLEVEL=protect  PERMIT TO update
    PRIORITY=180
    ACITAG='Portal grant update portalpersonalization for Portal Company Admin'
  }
  {
    ATTR(portalpersonalization:,portalpersonalization=*) ACCESS
      BY user='@edsdn@'  WITH AUTHLEVEL=protect  PERMIT TO update
    PRIORITY=190
    ACITAG='Portal grant update portalpersonalization for administrator'
  }
  {
    ATTR(aplogincontext:,aplogincontext=*,userpassword:,userpassword=*) ACCESS
      BY anyuser  WITH AUTHLEVEL=protect  PERMIT TO NotSearch,NotDisclose
    PRIORITY=200
    ACITAG='Portal deny search userpassword and aplogincontext for anyuser'
  }
  {
    ATTR(aplogincontext:,aplogincontext=*,userpassword:,userpassword=*) ACCESS
      BY user='@edsdn@'  PERMIT TO NotSearch,NotDisclose
    PRIORITY=255
    ACITAG='Portal deny search userpassword and aplogincontext for administrator'
  }
  {
    ATTR(aplogincontext:,aplogincontext=*) ACCESS
      BY self  WITH AUTHLEVEL=protect  PERMIT TO search,disclose
    PRIORITY=210
    ACITAG='Portal grant search aplogincontext for this entry'
  }
  {
    ATTR(aplogincontext:,aplogincontext=*) ACCESS
      BY user='*,ou=people,@companydn@'
        ,filter='(&(assignedRole=OTXPORTAL_COMPANY_ADMIN)(objectClass=otxUser))'
          WITH AUTHLEVEL=protect  PERMIT TO search,disclose
    PRIORITY=210
    ACITAG='Portal grant search aplogincontext for Portal Company Admin'
  }
  {
    ATTR(userpassword:,userpassword=*) ACCESS
      BY user='*,ou=people,@companydn@'
        ,filter='(&(assignedRole=OTXPORTAL_COMPANY_ADMIN)(objectClass=otxUser))'
          WITH AUTHLEVEL=protect  PERMIT TO ALL
    PRIORITY=210
    ACITAG='Portal grant access userpassword for this entry Portal Company Admin'
  }
  {
    ATTR(userpassword:,userpassword=*) ACCESS
      BY user='uid="portaluser",ou="config",@companydn@'  WITH AUTHLEVEL=protect  PERMIT TO NONE
    PRIORITY=255
    ACITAG='Portal deny access userpassword for deputation user'
  }

