Summary of the invention
For solving the problems of the technologies described above, the embodiment of the invention provides a kind of dynamic rights management method and system based on jforum, can make rights management be more prone to operation dynamically for the user makes up authority.
Technical scheme is as follows:
A kind of right management method comprises:
The configuration permission template generates space of a whole page bundle of permissions according to described permission template, and described bundle of permissions comprises user right;
Configure user login attribute when the user logins, obtains in the described bundle of permissions and the corresponding user right of described login attribute according to described login attribute.
Above-mentioned method, preferred, the title of described bundle of permissions comprises: space of a whole page ID, special separator and authority name.
Above-mentioned method, preferred, described configuration permission template also is specially according to the process that permission template generates space of a whole page bundle of permissions:
Formulate and configuration permission template file;
Resolve described permission template file, obtain permissions data;
Generate the bundle of permissions of the space of a whole page according to described permissions data.
Above-mentioned method, preferred, described login attribute comprises anonymous login attribute and sharing users login attribute.
Above-mentioned method, preferred, when the user logined, the detailed process of obtaining in the described bundle of permissions with the corresponding user right of described login attribute according to described login attribute was:
Judge login user login identity;
When if login user is anonymous, the described anonymous login of foundation attribute obtains in the described bundle of permissions logins the corresponding user right of attribute with described anonymous;
When if login user is non-anonymous, obtain in the described bundle of permissions and described anonymous login attribute, sharing users login attribute and the corresponding user right of user login information according to described anonymous login attribute, sharing users login attribute and user login information.
A kind of Rights Management System comprises:
First dispensing unit, generation unit, second dispensing unit and acquiring unit;
Wherein:
Described first dispensing unit is used to dispose permission template;
Described generation unit is used for generating space of a whole page bundle of permissions according to the permission template of described first dispensing unit configuration; Described space of a whole page bundle of permissions comprises user right;
Described second dispensing unit is used for configure user login attribute;
Described acquiring unit is used for when the user logins, and obtains in the bundle of permissions that described generation unit generates and the corresponding user right of described login attribute according to the login attribute of described second dispensing unit configuration.
Above-mentioned system, preferred, described first dispensing unit comprises: first handles subelement, resolves subelement and generates subelement;
Described first handles subelement is used for formulating and disposing the permission template file;
Described parsing subelement is used to resolve described permission template file, obtains permissions data;
The permissions data that described generation subelement is used for obtaining according to described parsing subelement generates the bundle of permissions of the space of a whole page.
The technical scheme that provides by the above embodiment of the invention as seen, right management method disclosed by the invention and system by the configuration permission template, generate the bundle of permissions of the space of a whole page, have dynamically set up the direct correlation relation of bundle of permissions with the space of a whole page; Configure user login attribute when the user logins, is selected and the corresponding user right of described login attribute.Right management method disclosed by the invention and system have realized the dynamic management and the distribution of authority, have simplified the user right layoutprocedure.
Embodiment
In order to make those skilled in the art person understand the present invention program better.Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills should belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
The method flow diagram of embodiment of the invention realization rights management comprises as shown in Figure 1:
Step S101: the configuration permission template, generate space of a whole page bundle of permissions according to described permission template, described bundle of permissions comprises user right;
The create right group also identifies described bundle of permissions.Dispose a plurality of permission template of work, be used to generate one or more bundle of permissions of a space of a whole page; The title of bundle of permissions adopts the mode of space of a whole page ID, special separator and the combination of authority name, as the unique identification of bundle of permissions.
Step S102: configure user login attribute, when the user logins, obtain in the described bundle of permissions and the corresponding user right of described login attribute according to described login attribute.
Disclosed configuration permission template of the embodiment of the invention and the process flow diagram that generates space of a whole page bundle of permissions according to permission template comprise as shown in Figure 2:
Step S201: formulate and configuration permission template file;
Step S202: resolve described permission template file, obtain permissions data;
Step S203: the bundle of permissions that generates the space of a whole page according to described permissions data.
The process flow diagram that the disclosed initial space of a whole page authority of the embodiment of the present application generates comprises as shown in Figure 3:
Step S301: definition permission template;
Formulate and the configuration template file, a plurality of character data of the general space of a whole page are as domestic consumer, edition owner user etc.;
Step S302: resolve permission template;
Resolve the permission template file, preserve resolution data to system cache, be convenient to reuse these data;
Step S303: create the space of a whole page and generate space of a whole page permissions data by remote interface;
By the remote service interface, call and create space of a whole page interface, create the space of a whole page and according to permissions data, for the current space of a whole page generates the associated rights group of the space of a whole page therewith, the corresponding bundle of permissions of role;
Step S304: preserve in the space of a whole page data to data storehouse;
The space of a whole page permissions data of the space of a whole page and generation is saved in the database.
One detail flowchart of the disclosed authority loading procedure of the embodiment of the present application comprises as shown in Figure 4:
Step S401: definition anonymous ID and sharing users ID;
Configuration anonymous ID and sharing users ID, the user of these two user ID correspondences is set to the state that can not land;
Step S402: judge whether the active user is that anonymity is landed; If, execution in step S403; Otherwise, execution in step S404;
Step S403: read the anonymous authority; Execution in step S405 then
According to anonymous ID, the authority of inquiry anonymous from system cache and database;
Step S404: the authority that reads anonymous, sharing users and current sessions user;
According to anonymous ID, sharing users ID and current sessions user profile, from system cache and database, inquire about anonymous, sharing users and current sessions user's authority;
Step S405: the record authority information is related with current sessions;
The authority information that reads is stored in the system cache related with the current sessions sign.Because it is more time taking reading authority, the buffer memory permissions data is convenient to the repeated use of permissions data like this.
For aforesaid method embodiment, for simple description, so it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the specification all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
At above method embodiment, the application also provides the corresponding Rights Management System with described method embodiment, and its structural representation comprises as shown in Figure 5:
First dispensing unit 501, generation unit 502, second dispensing unit 503 and acquiring unit 504;
Wherein:
First dispensing unit 501 is used to dispose permission template;
Generation unit 502 is used for generating space of a whole page bundle of permissions according to the permission template of described first dispensing unit 501 configurations; Described space of a whole page bundle of permissions comprises user right;
Second dispensing unit 503 is used for configure user login attribute;
Acquiring unit 504 is used for when the user logins, and obtains in the bundle of permissions that described generation unit 502 generates and the corresponding user right of described login attribute according to the login attribute of described second dispensing unit 503 configuration.
One detailed structure schematic diagram of the disclosed Rights Management System of the embodiment of the present application as shown in Figure 6, first dispensing unit 501 comprises: first handles subelement 601, resolves subelement 602 and generates subelement 603;
First handles subelement 601 is used for formulating and disposing the permission template file;
Resolve subelement 602 and be used to resolve described permission template file, obtain permissions data;
Generate the bundle of permissions that subelement 603 is used for generating according to the permissions data that described parsing subelement 602 obtains the space of a whole page.
Comprehensive above method embodiment and system embodiment, the present invention provides the approach easily and effectively of a management jforum forum for the keeper.Be convenient to dispose space of a whole page initial rights; Be convenient to manage overall user right; Be convenient to the authority of the configure user visit space of a whole page.In addition, by a few modifications of jfourm program, the user can carry out content-browsing separately in a column, can be only with regard to this space of a whole page search for article, check information about firms, statistical information, online information etc.; The dynamic management and the distribution of authority have been realized.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and identical similar part is mutually referring to getting final product between each embodiment, and each embodiment stresses all is difference with other embodiment.The above only is the specific embodiment of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.