From df7d7981b56a4560c95ea7e9b194080e93398ecf Mon Sep 17 00:00:00 2001 From: Matt Windsor Date: Mon, 21 Mar 2011 21:54:31 +0000 Subject: GREAT PACKAGE RESHUFFLE: Everything is now organised into frontend, backend and common (to frontend and backend) packages. Things may have been broken. Doc refresh. --- src/uk/org/ury/backend/database/UserClass.java | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/uk/org/ury/backend/database/UserClass.java (limited to 'src/uk/org/ury/backend/database/UserClass.java') diff --git a/src/uk/org/ury/backend/database/UserClass.java b/src/uk/org/ury/backend/database/UserClass.java new file mode 100644 index 0000000..1cd39fc --- /dev/null +++ b/src/uk/org/ury/backend/database/UserClass.java @@ -0,0 +1,38 @@ +/** + * + */ +package uk.org.ury.backend.database; + +/** + * The various user classes of the database driver. + * + * These refer to various users in the database proper, and thus grant various + * levels of permission to the program. + * + * Please use the least privileged user class that works. For most cases, + * READ_ONLY should work perfectly. + * + * @author Matt Windsor + * + */ + +public enum UserClass { + // Constant configName + READ_ONLY ("read_only"), + READ_WRITE ("read_write"); + + /** + * The name of the tag in the configuration file that contains the + * credentials for this user class. + */ + public String configName; + + /** + * Constructs a new UserClass. + * + * @param configName The name of the user class in the config. + */ + private UserClass(String configName) { + this.configName = configName; + } +} -- cgit v1.2.3