Re: Feedback on upcoming permission features

Anthony Pankov via Roundup-users <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user,gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
Thank you again John!

You're absolutely right.
There  is  identical  glyph  for  russian 'S' and english 'C'. This is
known issue but always unexpected and very hard to find.

This  is my fault but I didn't have any chance to see the difference.

> In message <[email protected]>,
> Anthony Pankov writes:
>>May be I'm confused with something but I found the following:
>>
>>db.security.addPermissionToRole('User', 'Create', 'issue')
>>
>>grant issue creation while:
>>
>>p=db.security.addPermission(name='РЎreate', klass='issue')
>>db.security.addPermissionToRole('User', p)
>>
>>or
>>
>>p=db.security.addPermission(name='РЎreate', klass='issue', props_only=False)
>>db.security.addPermissionToRole('User', p)
>>
>>or
>>
>>p=db.security.addPermission(name='РЎreate',klass='issue', props_only=True)
>>db.security.addPermissionToRole('User', p)
>>
>>do not grant permission to create an issue.

> I am not sure if you were copy/pasting the addPermission() examples,
> but the frist letter of the name value isn't 'C'.  Could you have a
> local keyboard/locale with something the looks like a 'C' but isn't
> the right ascii value?

> The following works for me to add perms:

>   v = db.security.addPermission(name='View', klass='keyword',
>       description="User is allowed to view")
>   e1 = db.security.addPermission(name='Edit', klass='keyword',
>       description="User is allowed to edit")
>   e2 = db.security.addPermission(name='Edit', klass='keyword',
>       check=own_keyword, description="User is allowed to edit own keyword")
>   c = db.security.addPermission(name='Create', klass='keyword',
>       description="User is allowed to create")

>   for role in base_roles:
>       rolename = role[0]
>       if rolename in skip_roles_for_basic_perms:
>           continue
>       db.security.addPermissionToRole(rolename, v)

>   # only agent people can edit queries
>   # User and Agent can create.
>   db.security.addPermissionToRole('Agent', e1)
>   db.security.addPermissionToRole('Agent', c)
>   db.security.addPermissionToRole('User', c)
>   db.security.addPermissionToRole('User', e2)


> Role "agent":
>  User is allowed to edit (Edit for "keyword" only)
>  User is allowed to create (Create for "keyword" only)
>  ...

> Role "user":
>  ...
>  User is allowed to view (View for "keyword" only)
>  User is allowed to create (Create for "keyword" only)
>  User is allowed to edit own keyword (Edit for "keyword" only)
>  ..

> Have a great day.

> --
>                                 -- rouilj
> John Rouillard
> ===========================================================================
> My employers don't acknowledge my existence much less my opinions.



-- 
Best regards,
 Anthony                          mailto:[email protected]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.