forked from Cytomine-ULiege/Cytomine-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SecurityTestsAbstract.groovy
74 lines (61 loc) · 2.05 KB
/
SecurityTestsAbstract.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package be.cytomine.security
/*
* Copyright (c) 2009-2019. Authors: see NOTICE file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import be.cytomine.test.BasicInstanceBuilder
/**
* Created by IntelliJ IDEA.
* User: lrollus
* Date: 2/03/11
* Time: 11:08
* To change this template use File | Settings | File Templates.
*/
class SecurityTestsAbstract {
/**
* Security test
*/
static String USERNAMEWITHOUTDATA = "USERNAMEWITHOUTDATA"
static String PASSWORDWITHOUTDATA = "PASSWORDWITHOUTDATA"
static String USERNAME1 = "USERNAME1"
static String PASSWORD1 = "PASSWORD1"
static String USERNAME2 = "USERNAME2"
static String PASSWORD2 = "PASSWORD2"
static String USERNAME3 = "USERNAME3"
static String PASSWORD3 = "PASSWORD3"
static String GUEST1 = "GUEST1"
static String GPASSWORD1 = "GPASSWORD1"
static String USERNAMEADMIN = "USERNAMEADMIN"
static String PASSWORDADMIN = "PASSWORDADMIN"
static String USERNAMEBAD = "BADUSER"
static String PASSWORDBAD = "BADPASSWORD"
User getUser1() {
BasicInstanceBuilder.getUser(USERNAME1,PASSWORD1)
}
User getUser2() {
BasicInstanceBuilder.getUser(USERNAME2,PASSWORD2)
}
User getUser3() {
BasicInstanceBuilder.getUser(USERNAME3,PASSWORD3)
}
User getGuest1() {
BasicInstanceBuilder.getGhest(GUEST1,GPASSWORD1)
}
User getUserAdmin() {
BasicInstanceBuilder.getSuperAdmin(USERNAMEADMIN,PASSWORDADMIN)
}
User getUserBad() {
BasicInstanceBuilder.getUser(USERNAMEBAD,PASSWORDBAD)
}
}