﻿<?xml version="1.0" encoding="UTF-8"?>
<Request xmlns="urn:oasis:names:tc:xacml:1.0:context"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:db="db_acad">


  <Subject>

    <Attribute AttributeId="db_acad_users_user_username"
               DataType="http://www.w3.org/2001/XMLSchema#string">
      <AttributeValue>head_COE</AttributeValue>
    </Attribute>

    <Attribute AttributeId="db_acad_users_user_role"
                DataType="http://www.w3.org/2001/XMLSchema#string" >
      <AttributeValue>head</AttributeValue>
    </Attribute>

    <Attribute AttributeId="db_acad_users_user_branch"
                DataType="http://www.w3.org/2001/XMLSchema#string" >
      <AttributeValue>COE</AttributeValue>
    </Attribute>

       
  </Subject>

  <Resource>

    <ResourceContent>

      <db:user type='target'>
        <db:username>student2</db:username>
        <db:password>xacml</db:password>
        <db:role>student</db:role>
        <db:branch>IT</db:branch>
        <db:permit>student3</db:permit>
        <db:permit>student1</db:permit>
        <db:dean_view_once>false</db:dean_view_once>

        <email>student2@acad.com</email>
        <db:marks>
          <db:sub1>86</db:sub1>
          <db:sub2>79</db:sub2>
          <db:sub3>85</db:sub3>
        </db:marks>
      </db:user>

      <db:user type='subject'>
        <db:username>head_COE</db:username>
        <db:role>head</db:role>
        <db:branch>COE</db:branch>
      </db:user>


      <db:subjects>
        <db:subject>
          <db:id>2</db:id>
          <db:name>sub2</db:name>
          <db:branch>COE</db:branch>
        </db:subject>
      </db:subjects>

    </ResourceContent>

    <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id"
                DataType="http://www.w3.org/2001/XMLSchema#string">
      <AttributeValue>sub2</AttributeValue>
    </Attribute>

    <Attribute AttributeId="policy_purpose"
                DataType="http://www.w3.org/2001/XMLSchema#string">
      <AttributeValue>moderation</AttributeValue>
    </Attribute>

  </Resource>

  <Action>
    <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id"
               DataType="http://www.w3.org/2001/XMLSchema#string">
      <AttributeValue>view</AttributeValue>
    </Attribute>
  </Action>
</Request>