start success

pull/1/head
rekoe 2016-03-22 09:49:43 +08:00
parent dcbe622982
commit aeeae29c47
8 changed files with 38 additions and 33 deletions

View File

@ -3,12 +3,14 @@ package com.rekoe.domain;
import java.io.Serializable;
import org.nutz.dao.entity.annotation.Comment;
import org.nutz.dao.entity.annotation.PK;
import org.nutz.dao.entity.annotation.Table;
/**
*
*/
@Table("pj_auth")
@PK({ "pj", "res", "gr" })
public class PjAuth implements Serializable {
/**
*

View File

@ -3,7 +3,7 @@ package com.rekoe.domain;
import java.io.Serializable;
import org.nutz.dao.entity.annotation.Comment;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.PK;
import org.nutz.dao.entity.annotation.Table;
/**
@ -11,7 +11,8 @@ import org.nutz.dao.entity.annotation.Table;
*
*/
@Table("pj_gr")
public class PjGr implements Serializable{
@PK({ "pj", "gr" })
public class PjGr implements Serializable {
/**
*
*/
@ -19,7 +20,7 @@ public class PjGr implements Serializable{
/**
*
*/
@Name
@Comment
private String pj;
/**
*

View File

@ -3,13 +3,18 @@ package com.rekoe.domain;
import java.io.Serializable;
import org.nutz.dao.entity.annotation.Comment;
import org.nutz.dao.entity.annotation.Index;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.PK;
import org.nutz.dao.entity.annotation.Table;
import org.nutz.dao.entity.annotation.TableIndexes;
/**
*
*/
@Table("pj_gr_usr")
@PK({ "pj", "usr", "gr" })
@TableIndexes({ @Index(name = "FK_Reference_10", fields = { "pj", "gr" }, unique = false), @Index(name = "FK_Reference_9", fields = { "usr" }, unique = false) })
public class PjGrUsr implements Serializable {
/**
*

View File

@ -1,12 +1,17 @@
package com.rekoe.domain;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Index;
import org.nutz.dao.entity.annotation.PK;
import org.nutz.dao.entity.annotation.Table;
import org.nutz.dao.entity.annotation.TableIndexes;
/**
* ,svnhttp()
*/
@Table("pj_usr")
@PK({ "usr", "pj" })
@TableIndexes({ @Index(name = "FK_Reference_5", fields = { "pj" }, unique = false) })
public class PjUsr extends Usr {
/**
*
@ -15,7 +20,7 @@ public class PjUsr extends Usr {
/**
* ID
*/
@Name
@Column
private String pj;
/**

View File

@ -3,6 +3,7 @@ package com.rekoe.domain;
import java.io.Serializable;
import org.nutz.dao.entity.annotation.Comment;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;
/**
@ -19,7 +20,7 @@ public class Usr implements Serializable {
/**
* ID
*/
@Comment
@Name
private String usr;
/**
*

View File

@ -13,4 +13,20 @@ INSERT INTO system_user_role(USERID,ROLEID) VALUES
(1,1);
/* .system_role_permission */
INSERT INTO system_role_permission(ROLEID,PERMISSIONID) VALUES
(1,1)
(1,1)
/*.svnadmin alter*/
alter table pj_gr add constraint FK_Relationship_2 foreign key (pj) references pj (pj) on delete restrict on update restrict;
/*.svnadmin alter*/
alter table pj_gr_auth add constraint FK_Reference_6 foreign key (pj, gr) references pj_gr (pj, gr) on delete restrict on update restrict;
/*.svnadmin alter*/
alter table pj_gr_usr add constraint FK_Reference_10 foreign key (pj, gr) references pj_gr (pj, gr) on delete restrict on update restrict;
/*.svnadmin alter*/
alter table pj_gr_usr add constraint FK_Reference_9 foreign key (usr) references usr (usr) on delete restrict on update restrict;
/*.svnadmin alter*/
alter table pj_usr add constraint FK_Reference_5 foreign key (pj) references pj (pj) on delete restrict on update restrict;
/*.svnadmin alter*/
alter table pj_usr add constraint FK_Reference_7 foreign key (usr) references usr (usr) on delete restrict on update restrict;
/*.svnadmin alter*/
alter table pj_usr_auth add constraint FK_Reference_11 foreign key (pj) references pj (pj) on delete restrict on update restrict;
/*.svnadmin alter*/
alter table pj_usr_auth add constraint FK_Reference_8 foreign key (usr) references usr (usr) on delete restrict on update restrict;

View File

@ -1,22 +1,10 @@
var ioc = {
platformEditDirective : {
type : "com.rekoe.web.freemarker.PlatformEditDirective",
events : {
create : "init",
}
},
shiroTags : {
type : "com.rekoe.shiro.freemarker.ShiroTags"
},
permissionResolver : {
type : "org.apache.shiro.authz.permission.WildcardPermissionResolver"
},
sidName : {
type : "com.rekoe.web.freemarker.Sid2NameDirective",
args : [ {
refer : "officialServerService"
} ]
},
permissionShiro : {
type : "com.rekoe.web.freemarker.PermissionShiroFreemarker",
args : [ {
@ -41,21 +29,12 @@ var ioc = {
timeFormat : {
type : "com.rekoe.web.freemarker.TimeFormatDirective"
},
platformPermission : {
type : "com.rekoe.web.freemarker.PlatformPermissionDirective"
},
mapTags : {
factory : "$freeMarkerConfigurer#addTags",
args : [ {
'shiro' : {
refer : 'shiroTags'
},
'sid_name' : {
refer : 'sidName'
},
'platform_perm' : {
refer : 'platformPermission'
},
'perm_chow' : {
refer : 'permissionShiro'
},
@ -76,9 +55,6 @@ var ioc = {
},
'currentTime' : {
refer : 'currentTime'
},
'platform_edit' : {
refer : 'platformEditDirective'
}
} ]
}

View File

@ -33,9 +33,8 @@ sha256Matcher.storedCredentialsHexEncoded = false
sha256Matcher.hashIterations = 1024
sha256Matcher.hashSalted = true
nutzAuthoRealm = com.rekoe.shiro.realm.NutAuthoDaoRealm
authTokenRealm = com.rekoe.shiro.realm.AuthTokenRealm
shiroDbRealm = com.rekoe.shiro.realm.UsernamePasswordRealm
shiroDbRealm.credentialsMatcher = $sha256Matcher
securityManager.realms = $shiroDbRealm,$nutzAuthoRealm,$authTokenRealm
securityManager.realms = $shiroDbRealm,$nutzAuthoRealm
authcStrategy = com.rekoe.shiro.authc.pam.AnySuccessfulStrategy
securityManager.authenticator.authenticationStrategy = $authcStrategy