Will refactor single letter

This seems to be the check on is the user authorised for the given
user/role - each module has a userrole table with a primary key of security
role and userid - the tuple comparison shown is the check that incoming
user plus read write is equal to what pks are in the Dbase



Paul Brian
07540 456 115
paul@mikadosoftware.com
Guiding you towards Continuous Delivery of software and business value.

On 18 Mar 2013, at 18:42, Philip Schatz <notifications@github.com> wrote:

In rhaptos2/repo/cnxbase.py:

> +
> +        [{'date_lastmodified_utc': None,
> +          'date_created_utc': None,
> +          'user_uri': u'Testuser1',
> +          'role_type': 'author'},
> +         {'date_lastmodified_utc': None,
> +          'date_created_utc': None,
> +          'user_uri': u'testuser2',
> +          'role_type': 'author'}]
> +
> +
> +
> +        """
> +        # is this authorised? - sep function?
> +        if (setter_user_uri, "aclrw") not in [(u.user_uri, u.role_type)
> +           for u in self.userroles]:

reusing a single-letter variable? I'm confused with what is going on here.

—
Reply to this email directly or view it on
GitHub<https://github.com/Connexions/rhaptos2.repo/pull/91/files#r3418063>
.

-- 


www.mikadosoftware.com

See your software improve with every change.