Skip to content

Commit

Permalink
WIP, back to previous version of User
Browse files Browse the repository at this point in the history
  • Loading branch information
danv61 committed May 9, 2024
1 parent b76f7f3 commit e977550
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions vcell-core/src/main/java/org/vcell/util/document/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public String toDatabaseString(){
private KeyValue key = null;
public static final String VCellTestAccountName = "vcelltestaccount";

public static final String[] publishers = {"frm","schaff","ion"};

public static final User tempUser = new User("temp",new KeyValue("123"));
public static final String VCELL_GUEST = "vcellguest";

Expand Down Expand Up @@ -79,15 +81,6 @@ public SpecialUser(String userid, KeyValue key,SPECIAL_CLAIM[] mySpecials) {
public SPECIAL_CLAIM[] getMySpecials() {
return mySpecials;
}

public boolean isAdmin() {
return Arrays.asList(mySpecials).contains(SPECIAL_CLAIM.admins);
}

public boolean isPublisher() {
return Arrays.asList(mySpecials).contains(SPECIAL_CLAIM.publicationEditors);
}

// @Override
// public boolean compareEqual(Matchable obj) {
// // TODO Auto-generated method stub
Expand Down Expand Up @@ -168,6 +161,15 @@ public int hashCode() {
return getName().hashCode();
}

/**
* Insert the method's description here.
* Creation date: (5/23/2006 8:33:53 AM)
* @return boolean
*/
public boolean isPublisher() {
return Arrays.asList(publishers).contains(userName);
}


/**
* @return true if this is test account
Expand Down

0 comments on commit e977550

Please sign in to comment.