Module Management general function design and implementation of the system (31--phase III Authority Design [1])

Source: Internet
Author: User

System of various authority design (1)

Video Commentary watch online: Video commentary link http://i.youku.com/jfok1972


The
system now has the ability to design a common four types of permissions.
1, the operation of the module permissions: Include can browse, add to delete, attachment crud operation, Audit. Approval, additional features of the operation (this has been forgotten before, in the following will be introduced).
2, the module record the visual permission: the popular speaking, is which records you can see, which records you cannot see.

3. Read-only permission for a field: for people with new and changed permissions. Further restrict which fields are read-only.
4. Visual permissions for fields: Which fields you can't see.


The above 4 kinds of permissions are also directly configured in the front-desk system can be effective.

The following is a brief introduction to each of the permissions design and implementation process.

First, the operation of the module permissions: In the previous module design process has been introduced this permission. Once a module has been added to the system, you need to set the module's permissions in the role. Contains: Can be browsed, can be added, can be changed, can be deleted, additional browsing, attachment additions, attachment changes, attachment deletion, auditable, can be approved, can be changed directly, but also includes each additional function of the operational rights.

The following is a permission setting interface for a system:



browsable assumptions are not selected. Indicates that the operator cannot view this module.

The response at the front desk is in the menu item without the module's menu.

can be added.
Can be changed, can be deleted, etc. are represented as modules with corresponding buttons in the toolbar. The permissions for attachment operations are also set separately for each module, allowing different people to manage the attachments of different modules separately. Take a look down:


take a look at how the add-on function is added. In the System Management module, there is a module to add the function of the management module. This module defines the additional functions that are used in all systems, including those used by the system modules.

The one you saw earlier is the button "import Module" in "Module" management. is an additional feature.

Some additional features also enable you to create a form to manipulate and then submit the data. As described earlier, set the "Additional fields" function on the module.


       
Each module features a field that contains:
        


for the 8 additional features in the contract payment plan, take a look at where to put it:


for additional permissions to run, it must be manually encoded, usually send an AJAX request to the server side to handle, the front desk will be ExtJS MVC to capture menu click events to run. For example, "Self-initiative" this additional function. The following JS code will be run:
agreementplanautocreate:function (Agreementid, grid) {Ext.Ajax.request ({url: ') Agreementplan/autocreate.do ', params: {agreementid:agreementid},success:function (response) {var message = Ext.decode (Response.responsetext); if (message.success = = False) Jfok.system.warnInfo (message.msg); ElseJfok.system.smileInfo ( ' The payment plan for this contract has been generated on its own initiative! ');
 Grid.store.reload ();},failure:function (response) {Window.alert (' Another generation of contract payment schedule failed! ');}})} 
The
background is handled by spring MVC, completing the corresponding operation and returning the result of the operation.
/** * own initiative to establish contract payment plan * @param agreementid  The ID number of the currently selected contract * @param request * @return */@RequestMapping ("/autocreate.do") publ IC @ResponseBodyActionResult autocreate (String Agreementid, httpservletrequest request) {ActionResult result = new ActionResult (); String r = Agreementplanservice.autocreateagreementplan (Integer.parseint (Agreementid), request), if (r = = null), else { Result.setsuccess (false); Result.setmsg (r);} return result;}}

For the definition of the department and the approving personnel of the module approval permission, the sample module is not practical and not introduced.

The settings for this permission are all systems will have. There are a variety of design methods, just to be able to complete the function.




Module Management general function design and implementation of the system (31--phase III Authority Design [1])

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.