Context Security Configuration


The following XML will be used to provide some explanation on the context security configuration

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE contextconfig PUBLIC "//MMBase - contextconfig//" "http://www.mmbase.org/dtd/securitycontextconfig.dtd">
<contextconfig>
  <loginmodules>
    <module name="anonymous" class="org.mmbase.security.implementation.context.AnonymousLogin" />
    <module name="name/password" class="org.mmbase.security.implementation.context.PasswordLogin" />
  </loginmodules>
  <accounts>
    <user name="anonymous" context="default" />
    <user name="admin" context="admin">
      <identify type="name/password" rank="administrator">admin2k</identify>
    </user>
    <user name="foo" context="default" >
      <identify type="name/password" rank="basic user">bar</identify>
    </user>
  </accounts>
  <groups>
    <group name="everyone">
      <contains type="group" named="users" />
      <contains type="user" named="anonymous" />
    </group>
    <group name="users">
      <contains type="user" named="foo" />
      <contains type="group" named="administrators" />
    </group>
    <group name="administrators">
      <contains type="user" named="admin" />
    </group>
  </groups>
  <contexts default="default">
    <context name="default">
      <operation type="create">
        <grant group="users" />
      </operation>
      <operation type="read">
        <grant group="everyone" />
      </operation>
      <operation type="write">
        <grant group="users" />
      </operation>
      <operation type="link">
        <grant group="users" />
      </operation>
      <operation type="delete">
        <grant group="users" />
      </operation>
      <operation type="change context">
        <grant group="administrators" />
      </operation>
      <possible context="default" />
    </context>
  </contexts>
</contextconfig>
    

The following values can be given to the elements of contexts.


This is part of the MMBase documentation.

For questions and remarks about this documentation mail to: [email protected]