guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmuehl...@apache.org
Subject [05/19] incubator-guacamole-client git commit: GUACAMOLE-5: Add sharing profile permissions.
Date Sun, 17 Jul 2016 22:28:33 GMT
GUACAMOLE-5: Add sharing profile permissions.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/a2ad7a69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/a2ad7a69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/a2ad7a69

Branch: refs/heads/master
Commit: a2ad7a69abe58e39e376370e8e6fdc017629cd6e
Parents: eededc3
Author: Michael Jumper <mjumper@apache.org>
Authored: Fri Jul 15 12:49:25 2016 -0700
Committer: Michael Jumper <mjumper@apache.org>
Committed: Sat Jul 16 11:42:47 2016 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/guacamole/net/auth/User.java | 14 ++++++++++++++
 .../net/auth/permission/SystemPermission.java         |  5 +++++
 .../apache/guacamole/net/auth/simple/SimpleUser.java  |  5 +++++
 3 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a2ad7a69/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
----------------------------------------------------------------------
diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
index d14cdd5..49a5e66 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/User.java
@@ -112,6 +112,20 @@ public interface User extends Identifiable {
             throws GuacamoleException;
 
     /**
+     * Returns all sharing profile permissions given to this user.
+     *
+     * @return
+     *     An ObjectPermissionSet of all sharing profile permissions granted to
+     *     this user.
+     *
+     * @throws GuacamoleException
+     *     If an error occurs while retrieving permissions, or if reading all
+     *     permissions is not allowed.
+     */
+    ObjectPermissionSet getSharingProfilePermissions()
+            throws GuacamoleException;
+
+    /**
      * Returns all permissions given to this user regarding currently-active
      * connections.
      *

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a2ad7a69/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
----------------------------------------------------------------------
diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
index e33f8e0..33779a5 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/permission/SystemPermission.java
@@ -50,6 +50,11 @@ public class SystemPermission implements Permission<SystemPermission.Type>
{
         CREATE_CONNECTION_GROUP,
 
         /**
+         * Create sharing profiles.
+         */
+        CREATE_SHARING_PROFILE,
+
+        /**
          * Administer the system in general, including adding permissions
          * which affect the system (like user creation, connection creation,
          * and system administration).

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/a2ad7a69/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java
----------------------------------------------------------------------
diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java
b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java
index da169fc..0b7a860 100644
--- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java
+++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/simple/SimpleUser.java
@@ -195,4 +195,9 @@ public class SimpleUser extends AbstractUser {
         return new SimpleObjectPermissionSet();
     }
 
+    @Override
+    public ObjectPermissionSet getSharingProfilePermissions() {
+        return new SimpleObjectPermissionSet();
+    }
+
 }


Mime
View raw message