Subversion Authentication Parser Module -


Apache
跨平台
Java

软件简介

Subversion Authentication Parser Module 是 Java 语言用来解析
Subversion 的 authz 认证文件的类库。

示例代码:

AccessRules accessRules = new AccessRules();

User user = UserFactory.createInstance("*");
AccessRule accessRuleRoot = new AccessRule("/");
accessRuleRoot.add(user, AccessLevel.READ);
accessRules.add(accessRuleRoot);

User userHarry = UserFactory.createInstance("harry");
User userBrian = UserFactory.createInstance("brian");

AccessRule accessRule = new AccessRule("repository", "/test/trunk");
accessRule.add(userHarry, AccessLevel.READ_WRITE);
accessRule.add(userMicheal, AccessLevel.READ_WRITE);
accessRules.add(accessRule);