01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.security;
06:
07: /**
08: * User is a the default implementation of a user.
09: *
10: * @author Dino Fancellu, Robin Sharp
11: */
12:
13: public class DefaultUser implements User {
14: public String getLoginName() {
15: return "";
16: }
17:
18: public String getFullName() {
19: return "";
20: }
21:
22: public boolean isLoggedIn() {
23: return false;
24: }
25:
26: public boolean hasPermission(String perm) {
27: if (perm.equalsIgnoreCase("BROWSE")) {
28: return true;
29: }
30: return false;
31: }
32:
33: public boolean hasPermissions(Object[] perms) {
34: for (int x = 0; x < perms.length; x++) {
35: if (hasPermission((String) perms[x])) {
36: return true;
37: }
38: }
39: return false;
40: }
41: }
|