Re: How to find out if a login has permission for an obj?
From: John Bell (jbellnewsposts_at_hotmail.com)
Date: 08/10/04
- Next message: Martin Hart - Memory Soft, S.L.: "Re: 'Distinct' but distinct what?"
- Previous message: Roji. P. Thomas: "Re: Inserting calculated values"
- Maybe in reply to: ryu: "How to find out if a login has permission for an obj?"
- Messages sorted by: [ date ] [ thread ]
Date: 9 Aug 2004 23:52:35 -0700
Hi
As you can GRANT UPDATE ON tablename [ ( Column[,...n] ) ], the
difference is as you expected. If you granted update permissions on a
table then PERMISSIONS(object_id('table'))&2 would equal 2 and
PERMISSIONS(object_id('table'))&8192 would equal 8192 i.e UPDATE ALL
and UPDATE ANY are both true. If you granted permissions on a single
column PERMISSIONS(object_id('table'))&2 would be equal 0 i.e. UPDATE
ALL is false and PERMISSIONS(object_id('table')) & 8192 would equal
8192 i.e. UPDATE ANY is true indicating you can update some but not
all columns. If you specified a column (col1) then
PERMISSIONS(object_id('table'),'col1') & 2 would equal 2 for an update
granted on the table and PERMISSIONS(object_id('table')) & 2 would
equal 2 if you specifically granted update on that column or 0 if you
didn't.
HTH
John
nospam_mytrash9@bellsouth.net (Mark) wrote in message news:<4116cadb.697612303@newsgroups.bellsouth.net>...
> Any idea as to what the difference is bewtween "ANY" and "ALL" (e.g UPDATE ALL
> versus UPDATE ANY). If I'm reading it correctly, when you specify only a table
> and no column "ALL" would mean the user has permissions on all columns. On the
> other hand, "ANY" would indicate the user has permission on at least one or more
> columns.
>
> Mark
>
> On Sun, 8 Aug 2004 08:46:07 +0100, "John Bell" <jbellnewsposts@hotmail.com>
> wrote:
>
> >Hi
> >
> >It will be the database user that has the permissions on the object and a
> >given login will map onto that user. Check out the PERMISSIONS ( [ objectid
> >[ , 'column' ] ] ) function in books online.
> >
> >John
> >
> >"ryu" <blizzardstorm8899@yahoo.com> wrote in message
> >news:edLo$TRfEHA.3732@TK2MSFTNGP11.phx.gbl...
> >> Is there a way for me to find if there is a way to find out whether a
> login
> >> has permissions for a db obj using only TSQL?
> >>
> >>
> >
> >
- Next message: Martin Hart - Memory Soft, S.L.: "Re: 'Distinct' but distinct what?"
- Previous message: Roji. P. Thomas: "Re: Inserting calculated values"
- Maybe in reply to: ryu: "How to find out if a login has permission for an obj?"
- Messages sorted by: [ date ] [ thread ]