Warning: Attempt to read property "date" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "msg" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "date" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "msg" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "date" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "msg" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "date" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "msg" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "date" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "msg" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/www/websvn.26th.net/html/blame.php on line 247
WebSVN – general – Blame – /hostadmiral/trunk/src/ak/hostadmiral/core/model/SystemUser.java/ – Rev 918

Subversion Repositories general

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
904 dev 1
package ak.hostcaptain.core.model;
899 dev 2
 
3
/**
4
 *
5
 * @hibernate.class table="systemusers"
6
 */
7
public class SystemUser
913 dev 8
	extends GeneralModelObject
899 dev 9
{
10
	private Long    id;
11
 
12
	/** user id in the OS */
13
	private Integer uid;
14
	private String  name;
911 dev 15
	private User    owner;
899 dev 16
 
17
	protected SystemUser()
18
	{
19
	}
20
 
21
	/**
22
	 *
23
	 * @hibernate.id generator-class="native"
24
	 */
25
	public Long getId()
26
	{
27
		return id;
28
	}
29
 
30
	public void setId(Long id)
31
	{
32
		this.id = id;
33
	}
34
 
35
	/**
36
	 *
37
	 * @hibernate.property
38
	 */
39
	public Integer getUid()
40
	{
41
		return uid;
42
	}
43
 
44
	public void setUid(Integer uid)
45
	{
46
		this.uid = uid;
47
	}
48
 
49
	/**
50
	 *
51
	 * @hibernate.property
52
	 */
53
	public String getName()
54
	{
55
		return name;
56
	}
57
 
58
	public void setName(String name)
59
	{
60
		this.name = name;
61
	}
911 dev 62
 
63
	/**
64
	 *
65
	 * @hibernate.many-to-one
66
	 */
67
	public User getOwner()
68
	{
69
		return owner;
70
	}
71
 
72
	public void setOwner(User owner)
73
	{
74
		this.owner = owner;
75
	}
76
 
899 dev 77
	public String getTypeKey()
78
	{
904 dev 79
		return ak.hostcaptain.core.CoreResources.TYPE_SYSTEM_USER;
899 dev 80
	}
81
 
913 dev 82
	public String getIdentKey()
899 dev 83
	{
913 dev 84
		return ak.hostcaptain.core.CoreResources.IDENT_SYSTEM_USER;
899 dev 85
	}
913 dev 86
 
87
	public Object[] getIdentParams()
88
	{
89
		return new Object[] { getName(), getUid() };
90
	}
914 dev 91
 
92
	public boolean viewableBy(User user)
93
	{
94
		return user.isSuperuser() || (owner == null) || user.equals(owner);
95
	}
96
 
97
	public boolean editableBy(User user)
98
	{
99
		return user.isSuperuser();
100
	}
101
 
102
	public boolean deleteableBy(User user)
103
	{
104
		return user.isSuperuser();
105
	}
899 dev 106
}