安全模式

webERP 的安全模式由以下几个部分构成:
  1. 用户:
    为每个用户建立单独帐户。
    用户帐户可以由管理员通过:
    Main Menu > Setup > User Accounts (WWW_Users.php) 来添加或删除。
    +++
    通过选择下拉菜单中的'Security Role',可以为每个用户可以分配'Security Role' (安全角色)。
    更多详情查看下面的默认安全角色列表。
    +++
  2. 安全角色:
    安全角色可以由管理员通过:
    Main Menu > Setup > Role Permissions (WWW_Access.php)添加。
    +++
    每一个安全角色都和一或多个安全选项相关连。
    安全选项可以通过 Main Menu > Setup > Role Permissions (WWW_Access.php) 进行设置。
    +++
    看下面的安全角色列表及添加于每个列表上的安全选项。

  3. 安全选项:
    15个安全选项默认开启。
    查看详情列表:
    每一个安全选项和查看一个或多个页面相关连。
    +++
    webERP并没有添加,删除或者编辑'安全角色'的功能。
    管理员可以通过编辑后台表格(securitytokens)来实现。

  4. PageSecurity 值:
    每一个 webERP 页面包括从1到15的页面安全值。
    安全值被编码到每一个页面中;比如:$PageSecurity = 1;
    每一个用户页面和相应的安全选项值相关连。
    +++
    没有可以编辑webERP 页面安全值的工具。
    然而管理员可以通过直接编辑页面来更改这一值。

以下部分组合在一起共同发挥作用。通过输入用户名和密码登录之后,系统可以识别用户的安全角色。用户的安全角色决定了相应的页面安全值。用户可以登录任何和他的安全角色值相对应的页面。


关于安全模式更具体的解释:

每一个webERP页面都和一个页面安全值相对应。页面安全值被编码在每一个页面的执行代码中。目前针对的值是1到15 。如果需要的话可以由管理员或者程序员来扩展这一值。各页面的默认安全值参见下面的列表。

接受用户访问的页面安全选项值储存在SESSION AllowedPageSecurityTokens 数组中。用户访问安全选项值是在帐户设定页面(WWW_users.php)中设置的整数。

用户对页面的访问权限在每一个代码执行页面中通过session.inc 被逐一检查 (PDF_Starter.inc对PDF页面来说)。当用户登录时,session.inc文件通过对数据库的访问得到$_SESSION['AccessLevel']变量 。这一变量指用户的安全角色。 基于用户的访问级别,SESSION['AllowedPageSecurityTokens']从数据库中得到数组对应的值。数组中的安全选项值和数组中预定义的值一一对应。

你需要打开角色定义页面(WWW.Access.php)如果希望添加更多的安全角色。 同时必须为新增加的安全角色指明安全选项。把用户分配到新增加的安全角色中意味着他可以访问和安全选项值对应的页面。这一方面使得管理员可以控制用户的适当访问权限。

通过给用户分配适当的安全角色以及调整和安全角色相对应的安全选项值,可以给任何用户设定相应的访问权限。 请参考以下表格中的默认参数以作出相应的调整。同时,你也应该了解页面安全访问值。同样,默认的值也可以被修改。

安全模式表:

Table.Field 表域 Example Data 示范数据 Comment 备注
www_user.userid
www_user.fullaccess
demo
8
通过
WWW_Users.php页面更新
securityroles.secroleid
securityroles.secrolename
8
System Administrator
通过执行WWW_Access.php,
域值在安全角色被创建或者删除时发生变化
securitygroups.secroleid
securitygroups.tokenid
8
1
通过执行WWW_Access.php,
域值在给安全角色赋予安全选项值时发生变化
securitytokens.tokenid
securitytokens.tokenname
1
Menu and Order Entry Only
15 个事先定义的安全选项
没有webERP工具可以更改这一数据
webERP page CustomerInquiry.php
$PageSecurity = 1;
事先定义的各个页面的页面安全值
没有webERP工具可以更改这一数据


安全角色: webERP 版本 3.0.5

1 - Inquiries/Order Entry
2 - Manufac/Stock Admin
3 - Purchasing officer
4 - AP Clerk
5 - AR Clerk
6 - Accountant
7 - Customer logon only
8 - System Administrator

安全选项: webERP 版本 3.0.5

1 - Inquiries/Order Entry tokens = 1, 2
2 - Manufac/Stock Admin tokens = 1, 2, 11
3 - Purchasing officer tokens = 1, 2, 3, 4, 5, 11
4 - AP Clerk tokens = 1, 2, 5
5 - AR Clerk tokens = 1, 2, 5, 11
6 - Accountant tokens = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
7 - Customer logon only token = 1
8 - System Administrator = All the currently defined security tokens

安全选项: webERP 版本 3.0.5

1 - Menu and order entry only
2 - Inventory, AR & AP inquiries & reports
3 - AR setup customers, areas, receipts, allocations, credit notes, salesfolk, credit status
4 - PO Entry, Purchasing data & reorder levels
5 - AP Invoice, Credit, Payment entry. Supplier maintenance
6 - Not used
7 - Bank reconciliations
8 - GL Journals, COA, sales/COGS GL postings, terms, cost update, company prefs
9 - Ledger Maintenance and Manufacturing
10 - GL Journals, COA, sales/COGS GL postings, terms, cost update, company prefs
11 - Pricing & Inventory locations, categories, receiving & adjustments
12 - No Used
13 - Not Used
14 - Not Used
15 - User management, System Admin setup & utilities

页面安全值: webERP 版本 3.0.5

页面(代码文件)名 页面安全值
CustomerInquiry.php1
GetStockImage.php1
index.php1
Logout.php1
MailInventoryValuation.php1
PDFStockLocTransfer.php1
PDFStockNegatives.php1
PrintCustTrans.php1
PrintCustTransPortrait.php1
reportwriter/FormMaker.php1
reportwriter/ReportMaker.php1
SelectCompletedOrder.php1
SelectOrderItems.php1
AgedDebtors.php2
AgedSuppliers.php2
BOMInquiry.php2
BOMListing.php2
ConfirmDispatch_Invoice.php2
CustomerTransInquiry.php2
CustWhereAlloc.php2
DebtorsAtPeriodEnd.php2
EmailCustTrans.php2
FTP_RadioBeacon.php2
InventoryPlanning.php2
InventoryValuation.php2
OrderDetails.php2
OutstandingGRNs.php2
PDFCustomerList.php2
PDFLowGP.php2
PDFPriceList.php2
PDFQuotation.php2
PDFStockCheckComparison.php2
PeriodsInquiry.php2
PO_OrderDetails.php2
PO_PDFPurchOrder.php2
PO_SelectOSPurchOrder.php2
PO_SelectPurchOrder.php2
Prices.php2
PrintCustOrder_generic.php2
PrintCustOrder.php2
PrintCustStatements.php2
reportwriter/admin/ReportCreator.php2
SalesAnalReptCols.php2
SalesAnalRepts.php2
SalesAnalysis_UserDefined.php2
SelectCustomer.php2
SelectProduct.php2
SelectRecurringSalesOrder.php2
SelectSalesOrder.php2
SelectSupplier.php2
ShiptsList.php2
StockCheck.php2
StockCostUpdate.php2
StockCounts.php2
StockLocMovements.php2
StockLocStatus.php2
StockMovements.php2
StockQuantityByDate.php2
StockSerialItems.php2
StockStatus.php2
StockUsage.php2
StockUsageGraph.php2
SupplierBalsAtPeriodEnd.php2
SupplierTransInquiry.php2
Tax.php2
WhereUsedInquiry.php2
Z_CheckAllocs.php2
Areas.php3
Credit_Invoice.php3
CreditItemsControlled.php3
CreditStatus.php3
CustomerAllocations.php3
CustomerBranches.php3
CustomerReceipt.php3
Customers.php3
PDFBankingSummary.php3
PDFChequeListing.php3
PDFDeliveryDifferences.php3
PDFDIFOT.php3
PDFOrdersInvoiced.php3
PDFOrderStatus.php3
SalesPeople.php3
SelectCreditItems.php3
StockSerialItemResearch.php3
PO_Header.php4
PO_Items.php4
PurchData.php4
SpecialOrder.php4
StockReorderLevel.php4
Payments.php5
PrintCheque.php5
StockQties_csv.php5
SuppCreditGRNs.php5
SuppInvGRNs.php5
SupplierAllocations.php5
SupplierCredit.php5
SupplierInvoice.php5
Suppliers.php5
SuppPaymentRun.php5
SuppShiptChgs.php5
SuppTransGLAnalysis.php5
SalesGraph.php6
BankMatching.php7
BankReconciliation.php7
GLAccountInquiry.php8
GLBalanceSheet.php8
GLCodesInquiry.php8
GLProfit_Loss.php8
GLTransInquiry.php8
GLTrialBalance.php8
SelectGLAccount.php8
BOMs.php9
Currencies.php9
Z_CreateChartDetails.php9
AccountGroups.php10
AccountSections.php10
BankAccounts.php10
COGSGLPostings.php10
CompanyPreferences.php10
EDIMessageFormat.php10
GLAccounts.php10
GLJournal.php10
PaymentTerms.php10
SalesGLPostings.php10
WorkOrderEntry.php10
WorkOrderIssue.php10
ConfirmDispatchControlled_Invoice.php11
CustEDISetup.php11
DiscountCategories.php11
DiscountMatrix.php11
EDIProcessOrders.php11
FreightCosts.php11
GoodsReceived.php11
GoodsReceivedControlled.php11
Locations.php11
Prices_Customer.php11
ReverseGRN.php11
SalesCategories.php11
ShipmentCosting.php11
Shipments.php11
Shipt_Select.php11
StockAdjustments.php11
StockAdjustmentsControlled.php11
StockCategories.php11
StockLocTransfer.php11
StockLocTransferReceive.php11
Stocks.php11
StockTransferControlled.php11
StockTransfers.php11
TaxAuthorityRates.php11
EDISendInvoices.php15
PaymentMethods.php15
SalesTypes.php15
Shippers.php15
SystemParameters.php15
TaxCategories.php15
TaxProvinces.php15
UnitsOfMeasure.php15
Z_CheckAllocationsFrom.php15
Z_index.php15
Z_MakeNewCompany.php15
Z_poAddLanguage.php15
Z_poAdmin.php15
Z_poEditLangHeader.php15
Z_poEditLangModule.php15
Z_poRebuildDefault.php15
Z_Upgrade_3.01-3.02.php15
Z_Upgrade_3.04-3.05.php15