[Babase] Karl: Permissions problems?
Karl O. Pinc
kop at meme.com
Thu Oct 14 11:48:25 EDT 2010
On 10/14/2010 10:03:56 AM, Lacey Maryott Roerish wrote:
> Hey Karl,
>
> I set up a new table in babase_pending called babtissue. This
> table is
> for use by one of our techs and I have granted him 'all' on the
> table.. and
> yet he is getting a permissions error for the tid column I set up as
> sequence... It is also the case that he gets errors when trying to
> add
> new
> columns, wherein he is told he has to be the owner of the table to
> add
> columns. I also granted all to babase_editors and select to
> babase_readers,
> and tried to make the above changes myself and got the same errors.
> Did I
> just set the table up wrong?
I swear we documented this somewhere. I think Niki and Patrick had
a similar issue. I can't find it on the wiki....
Ah, it's in the sandbox, where only disposable stuff should live.
Perhaps the sections in there each need their own page linked
to from the admin page?
When you make a table with a sequence you need to grant SELECT
on the sequence to anyone with read rights, and UPDATE to anyone
with write rights. The name of the sequence is
tablename_columnname_seq, where "tablename" is the name of the
table and "columnname" is the name of the column.
As far as adding columns and removing columns, only the owner
can do that. If you want more than one person to be able
to do this then you create a role, have the role be the
table owner, and then grant whomever you wish membership in the
new role. So far we've not had this sort of shared access.
-- as babase_admin (because babase_admin can create roles)
CREATE ROLE babtissuers;
ALTER TABLE babtissue OWNER TO babtissuers;
GRANT babtissuers TO lacey;
GRANT babtissuers TO tech;
You may want to document this on the wiki. We will certainly
want to document which roles exist to do what. (Right now
the only roles are babase_editors and babase_readers.)
See:
http://www.postgresql.org/docs/8.1/static/privileges.html
http://www.postgresql.org/docs/8.1/static/sql-grant.html
Karl <kop at meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
More information about the Babase
mailing list