esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vassil Dichev <vdic...@apache.org>
Subject Access Pools
Date Mon, 04 May 2009 07:35:21 GMT
There is a working prototype of the access pools concept in the
access-pools branch. There's no UI yet, but you can try it using the
RestAPI.

Here, I will use curl as an example, it should be installed on Macs
and should be trivial to install (if it's not already there) on Linux.

First of all, you need to log in:

  curl -c cookies.txt http://localhost:8080/api/login -d token=<YOUR_TOKEN>

1. To create a pool:

  curl -b cookies.txt http://localhost:8080/api/add_pool/<pool_name> -d ""

The pool creator is also an administrator of the pool. You can also
pass the "realm" parameter, by default it uses "Native"

2. To allow a user rights in an access pool:

  curl -b cookies.txt http://localhost:8080/api/add_user_pool -d
pool=<pool_name> -d user=<user_to_add>

There are also the following optional parameters:
-realm: "Native" by default
-permission: "Write" by default. There's also Read and Admin. Write
includes Read, Admin includes Write (as suggested by Bill Fernandez in
his proposal)

3. To send a message to a certain pool:

  curl -b cookies.txt http://localhost:8080/api/send_msg -d
message="private message" -d pool=<pool_name>

There's also an optional "realm" parameter you can pass there.

Messages in a pool might appear in places where they aren't supposed
to, but they should at least be filtered from a user's friends
timeline.

My next todo tasks: ensure that messages in restricted pools can't be
seen anywhere where they're not supposed to: search results, twitter
API, etc. Then enhance the UI for sending messages, so you can specify
a pool, and finally a UI for adding a pool and adding users to a pool.

Vassil

Mime
View raw message