UnitTest( acl.sunnyerp.unit.test.asp )

Sources

/axe-ut/acl.sunnyerp.unit.test.asp

<!--#include virtual="/lib/unit-tests.asp"-->
<!--#include virtual="/lib/axe/classes/Parsers/json2.asp"-->
<script language="javascript" runat="server" src="/lib/nagaozen.js"></script>
<%
 
' 
 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en">
    <head>
        <title>AXE - Unit Test - acl.sunnyerp.unit.test.asp</title>
        <!--// meta tags //-->
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <!--// link tags //-->
        <link rel="stylesheet" type="text/css" media="screen" href="/lib/unit-tests.css" />
    </head>
    <body>
        <div id="container">
            <div id="container-hd">
                <h1>UnitTest( acl.sunnyerp.unit.test.asp )</h1>
            </div>
            <div id="container-bd">
            </div>
            <div id="container-ft">
                <h2>Sources</h2>
                <h3><%= Request.ServerVariables("SCRIPT_NAME") %></h3>
                <div class="code"><%= geshify( loadTextFile( Server.mapPath( Request.ServerVariables("SCRIPT_NAME") ) ), "asp" ) %></div>
                <h3>nagaozen.js</h3>
                <div class="code"><%= geshify( loadTextFile( Server.mapPath( "/lib/sunnyerp_acl.js" ) ), "javascript" ) %></div>
            </div>
        </div>
        <!--// javascript tags //-->
    </body>
</html>
 

nagaozen.js

var ACL = {
    "Users": {
        "anderson": {
            "manager": null
        },
        "andres": {
            "manager": null
        },
        "dug": {
            "dealer": null
        },
        "heidi": {
            "salesman": null
        },
        "loja": {
            "dealer": null
        },
        "nagaozen": {
            "administrator": null
        }
    },
    "Roles": {
        "administrator": [null, {}],
        "manager": [null, {}],
        "salesman": [null, {}],
        "dealer": [null, {}]
    },
    "Resources": {
        "__GLOBAL__": [null, {
            "Sales": null,
            "Purchases": null,
            "Supply Chain": null,
            "Manufacturing": null,
            "Accounting": null,
            "Human Resources": null
        }],
        "Sales": ["__GLOBAL__", {
            "Sales_Orders": null,
            "Sales_Receive products": null,
            "Sales_Invoices": null,
            "Sales_Customers": null,
            "Sales_Products": null,
            "Sales_Catalogs": null,
            "Sales_Carriers": null
        }],
        "Sales_Orders": ["Sales", {}],
        "Sales_Receive products": ["Sales", {}],
        "Sales_Invoices": ["Sales", {}],
        "Sales_Customers": ["Sales", {}],
        "Sales_Products": ["Sales", {}],
        "Sales_Catalogs": ["Sales", {}],
        "Sales_Carriers": ["Sales", {}],
        "Purchases": ["__GLOBAL__", {
            "Purchases_Request for quotations": null,
            "Purchases_Orders": null,
            "Purchases_Receive products": null,
            "Purchases_Suppliers": null,
            "Purchases_Products": null,
            "Purchases_Catalogs": null,
            "Purchases_Carriers": null
        }],
        "Purchases_Request for quotations": ["Purchases", {}],
        "Purchases_Orders": ["Purchases", {}],
        "Purchases_Receive products": ["Purchases", {}],
        "Purchases_Suppliers": ["Purchases", {}],
        "Purchases_Products": ["Purchases", {}],
        "Purchases_Catalogs": ["Purchases", {}],
        "Purchases_Carriers": ["Purchases", {}],
        "Supply Chain": ["__GLOBAL__", {
            "Supply Chain_Stock moves": null,
            "Supply Chain_Deliver packages": null,
            "Supply Chain_Receive packages": null,
            "Supply Chain_Warehouses": null,
            "Supply Chain_Products": null
        }],
        "Supply Chain_Stock moves": ["Supply Chain", {}],
        "Supply Chain_Deliver packages": ["Supply Chain", {}],
        "Supply Chain_Receive packages": ["Supply Chain", {}],
        "Supply Chain_Warehouses": ["Supply Chain", {}],
        "Supply Chain_Products": ["Supply Chain", {}],
        "Manufacturing": ["__GLOBAL__", {
            "Manufacturing_Orders": null,
            "Manufacturing_Bill of materials": null
        }],
        "Manufacturing_Orders": ["Manufacturing", {}],
        "Manufacturing_Bill of materials": ["Manufacturing", {}],
        "Accounting": ["__GLOBAL__", {
            "Accounting_Customers": null,
            "Accounting_Customer invoices": null,
            "Accounting_Customer refunds": null,
            "Accounting_Customer payment": null,
            "Accounting_Suppliers": null,
            "Accounting_Supplier invoices": null,
            "Accounting_Supplier refunds": null,
            "Accounting_Supplier payment": null,
            "Accounting_Banks": null,
            "Accounting_Currency Converter": null
        }],
        "Accounting_Customers": ["Accounting", {}],
        "Accounting_Customer invoices": ["Accounting", {}],
        "Accounting_Customer refunds": ["Accounting", {}],
        "Accounting_Customer payment": ["Accounting", {}],
        "Accounting_Suppliers": ["Accounting", {}],
        "Accounting_Supplier invoices": ["Accounting", {}],
        "Accounting_Supplier refunds": ["Accounting", {}],
        "Accounting_Supplier payment": ["Accounting", {}],
        "Accounting_Banks": ["Accounting", {}],
        "Accounting_Currency Converter": ["Accounting", {}],
        "Human Resources": ["__GLOBAL__", {
            "Human Resources_Employees": null,
            "Human Resources_Expenses": null,
            "Human Resources_Time tracking": null,
            "Human Resources_Holidays": null,
            "Human Resources_Applicants": null,
            "Human Resources_Job positions": null
        }],
        "Human Resources_Employees": ["Human Resources", {}],
        "Human Resources_Expenses": ["Human Resources", {}],
        "Human Resources_Time tracking": ["Human Resources", {}],
        "Human Resources_Holidays": ["Human Resources", {}],
        "Human Resources_Applicants": ["Human Resources", {}],
        "Human Resources_Job positions": ["Human Resources", {}]
    },
    "Rules": {
        "administrator": {
            "__GLOBAL__": {
                "access": ["ALLOW", null]
            }
        },
        "dealer": {
            "Sales": {
                "access": ["ALLOW", null]
            }
        }
    }
}