mirror of https://github.com/Rekoe/rk_svnadmin
start success
parent
dcbe622982
commit
aeeae29c47
|
@ -3,12 +3,14 @@ package com.rekoe.domain;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.nutz.dao.entity.annotation.Comment;
|
import org.nutz.dao.entity.annotation.Comment;
|
||||||
|
import org.nutz.dao.entity.annotation.PK;
|
||||||
import org.nutz.dao.entity.annotation.Table;
|
import org.nutz.dao.entity.annotation.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限
|
* 权限
|
||||||
*/
|
*/
|
||||||
@Table("pj_auth")
|
@Table("pj_auth")
|
||||||
|
@PK({ "pj", "res", "gr" })
|
||||||
public class PjAuth implements Serializable {
|
public class PjAuth implements Serializable {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.rekoe.domain;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.nutz.dao.entity.annotation.Comment;
|
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;
|
import org.nutz.dao.entity.annotation.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,8 @@ import org.nutz.dao.entity.annotation.Table;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Table("pj_gr")
|
@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;
|
private String pj;
|
||||||
/**
|
/**
|
||||||
* 组
|
* 组
|
||||||
|
|
|
@ -3,13 +3,18 @@ package com.rekoe.domain;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.nutz.dao.entity.annotation.Comment;
|
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.Name;
|
||||||
|
import org.nutz.dao.entity.annotation.PK;
|
||||||
import org.nutz.dao.entity.annotation.Table;
|
import org.nutz.dao.entity.annotation.Table;
|
||||||
|
import org.nutz.dao.entity.annotation.TableIndexes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目组用户
|
* 项目组用户
|
||||||
*/
|
*/
|
||||||
@Table("pj_gr_usr")
|
@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 {
|
public class PjGrUsr implements Serializable {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
package com.rekoe.domain;
|
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.Table;
|
||||||
|
import org.nutz.dao.entity.annotation.TableIndexes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目用户 。只对单库方式有用,包括svn协议和http协议(单库),可以每个项目设置用户的密码
|
* 项目用户 。只对单库方式有用,包括svn协议和http协议(单库),可以每个项目设置用户的密码
|
||||||
*/
|
*/
|
||||||
@Table("pj_usr")
|
@Table("pj_usr")
|
||||||
|
@PK({ "usr", "pj" })
|
||||||
|
@TableIndexes({ @Index(name = "FK_Reference_5", fields = { "pj" }, unique = false) })
|
||||||
public class PjUsr extends Usr {
|
public class PjUsr extends Usr {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -15,7 +20,7 @@ public class PjUsr extends Usr {
|
||||||
/**
|
/**
|
||||||
* 项目ID
|
* 项目ID
|
||||||
*/
|
*/
|
||||||
@Name
|
@Column
|
||||||
private String pj;
|
private String pj;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.rekoe.domain;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.nutz.dao.entity.annotation.Comment;
|
import org.nutz.dao.entity.annotation.Comment;
|
||||||
|
import org.nutz.dao.entity.annotation.Name;
|
||||||
import org.nutz.dao.entity.annotation.Table;
|
import org.nutz.dao.entity.annotation.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,7 +20,7 @@ public class Usr implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 用户ID
|
* 用户ID
|
||||||
*/
|
*/
|
||||||
@Comment
|
@Name
|
||||||
private String usr;
|
private String usr;
|
||||||
/**
|
/**
|
||||||
* 用户姓名
|
* 用户姓名
|
||||||
|
|
|
@ -13,4 +13,20 @@ INSERT INTO system_user_role(USERID,ROLEID) VALUES
|
||||||
(1,1);
|
(1,1);
|
||||||
/* .system_role_permission */
|
/* .system_role_permission */
|
||||||
INSERT INTO system_role_permission(ROLEID,PERMISSIONID) VALUES
|
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;
|
|
@ -1,22 +1,10 @@
|
||||||
var ioc = {
|
var ioc = {
|
||||||
platformEditDirective : {
|
|
||||||
type : "com.rekoe.web.freemarker.PlatformEditDirective",
|
|
||||||
events : {
|
|
||||||
create : "init",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
shiroTags : {
|
shiroTags : {
|
||||||
type : "com.rekoe.shiro.freemarker.ShiroTags"
|
type : "com.rekoe.shiro.freemarker.ShiroTags"
|
||||||
},
|
},
|
||||||
permissionResolver : {
|
permissionResolver : {
|
||||||
type : "org.apache.shiro.authz.permission.WildcardPermissionResolver"
|
type : "org.apache.shiro.authz.permission.WildcardPermissionResolver"
|
||||||
},
|
},
|
||||||
sidName : {
|
|
||||||
type : "com.rekoe.web.freemarker.Sid2NameDirective",
|
|
||||||
args : [ {
|
|
||||||
refer : "officialServerService"
|
|
||||||
} ]
|
|
||||||
},
|
|
||||||
permissionShiro : {
|
permissionShiro : {
|
||||||
type : "com.rekoe.web.freemarker.PermissionShiroFreemarker",
|
type : "com.rekoe.web.freemarker.PermissionShiroFreemarker",
|
||||||
args : [ {
|
args : [ {
|
||||||
|
@ -41,21 +29,12 @@ var ioc = {
|
||||||
timeFormat : {
|
timeFormat : {
|
||||||
type : "com.rekoe.web.freemarker.TimeFormatDirective"
|
type : "com.rekoe.web.freemarker.TimeFormatDirective"
|
||||||
},
|
},
|
||||||
platformPermission : {
|
|
||||||
type : "com.rekoe.web.freemarker.PlatformPermissionDirective"
|
|
||||||
},
|
|
||||||
mapTags : {
|
mapTags : {
|
||||||
factory : "$freeMarkerConfigurer#addTags",
|
factory : "$freeMarkerConfigurer#addTags",
|
||||||
args : [ {
|
args : [ {
|
||||||
'shiro' : {
|
'shiro' : {
|
||||||
refer : 'shiroTags'
|
refer : 'shiroTags'
|
||||||
},
|
},
|
||||||
'sid_name' : {
|
|
||||||
refer : 'sidName'
|
|
||||||
},
|
|
||||||
'platform_perm' : {
|
|
||||||
refer : 'platformPermission'
|
|
||||||
},
|
|
||||||
'perm_chow' : {
|
'perm_chow' : {
|
||||||
refer : 'permissionShiro'
|
refer : 'permissionShiro'
|
||||||
},
|
},
|
||||||
|
@ -76,9 +55,6 @@ var ioc = {
|
||||||
},
|
},
|
||||||
'currentTime' : {
|
'currentTime' : {
|
||||||
refer : 'currentTime'
|
refer : 'currentTime'
|
||||||
},
|
|
||||||
'platform_edit' : {
|
|
||||||
refer : 'platformEditDirective'
|
|
||||||
}
|
}
|
||||||
} ]
|
} ]
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,9 +33,8 @@ sha256Matcher.storedCredentialsHexEncoded = false
|
||||||
sha256Matcher.hashIterations = 1024
|
sha256Matcher.hashIterations = 1024
|
||||||
sha256Matcher.hashSalted = true
|
sha256Matcher.hashSalted = true
|
||||||
nutzAuthoRealm = com.rekoe.shiro.realm.NutAuthoDaoRealm
|
nutzAuthoRealm = com.rekoe.shiro.realm.NutAuthoDaoRealm
|
||||||
authTokenRealm = com.rekoe.shiro.realm.AuthTokenRealm
|
|
||||||
shiroDbRealm = com.rekoe.shiro.realm.UsernamePasswordRealm
|
shiroDbRealm = com.rekoe.shiro.realm.UsernamePasswordRealm
|
||||||
shiroDbRealm.credentialsMatcher = $sha256Matcher
|
shiroDbRealm.credentialsMatcher = $sha256Matcher
|
||||||
securityManager.realms = $shiroDbRealm,$nutzAuthoRealm,$authTokenRealm
|
securityManager.realms = $shiroDbRealm,$nutzAuthoRealm
|
||||||
authcStrategy = com.rekoe.shiro.authc.pam.AnySuccessfulStrategy
|
authcStrategy = com.rekoe.shiro.authc.pam.AnySuccessfulStrategy
|
||||||
securityManager.authenticator.authenticationStrategy = $authcStrategy
|
securityManager.authenticator.authenticationStrategy = $authcStrategy
|
Loading…
Reference in New Issue