Skip to content

Commit e42af3c

Browse files
committed
Server:新增测试记录
1 parent 742e170 commit e42af3c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

APIJSON-Java-Server/APIJSONLibrary/src/main/java/zuo/biao/apijson/server/AbstractVerifier.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import zuo.biao.apijson.server.model.Response;
4848
import zuo.biao.apijson.server.model.Table;
4949
import zuo.biao.apijson.server.model.Test;
50+
import zuo.biao.apijson.server.model.TestRecord;
5051

5152
/**权限验证
5253
* @author Lemon
@@ -67,6 +68,7 @@ public abstract class AbstractVerifier implements Verifier {
6768
ACCESS_MAP.put(Request.class.getSimpleName(), getAccessMap(Request.class.getAnnotation(MethodAccess.class)));
6869
ACCESS_MAP.put(Response.class.getSimpleName(), getAccessMap(Response.class.getAnnotation(MethodAccess.class)));
6970
ACCESS_MAP.put(Document.class.getSimpleName(), getAccessMap(Document.class.getAnnotation(MethodAccess.class)));
71+
ACCESS_MAP.put(TestRecord.class.getSimpleName(), getAccessMap(TestRecord.class.getAnnotation(MethodAccess.class)));
7072
}
7173

7274
/**获取权限Map,每种操作都只允许对应的角色
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON)
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.*/
14+
15+
package zuo.biao.apijson.server.model;
16+
17+
import static zuo.biao.apijson.RequestRole.ADMIN;
18+
import static zuo.biao.apijson.RequestRole.LOGIN;
19+
20+
import zuo.biao.apijson.MethodAccess;
21+
22+
/**条件测试
23+
* @author Lemon
24+
*/
25+
@MethodAccess(GET = { LOGIN, ADMIN }, HEAD = { LOGIN, ADMIN })
26+
public class TestRecord {
27+
}

0 commit comments

Comments
 (0)