You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ponymail.apache.org by sebbASF <gi...@git.apache.org> on 2016/12/14 01:20:57 UTC

[GitHub] incubator-ponymail issue #297: Enh: simplify rights checking

GitHub user sebbASF opened an issue:

    https://github.com/apache/incubator-ponymail/issues/297

    Enh: simplify rights checking

    At present, access checking is quite complicated:
    
    ```
    local canUse = false
    if doc.private then
        if account then
            if not rights then
                rights = aaa.rights(r, account)
            end
            canUse = utils.canAccessDoc(doc, rights)
        end
    else
        canUse = true
    end
    if canUse then
    ...
    end
    ```
    
    This is because it may be expensive to fetch the rights so it should only be done if necessary.
    It would be nice to be able to do something like the following:
    ```
    if utils.canAccessDoc(doc, ...) then
    ...
    end
    ```
    If the caller passed a function to the canAccessDoc() method, the function could cache the rights the first time it was called.

----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #297: Enh: simplify rights checking

Posted by sebbASF <gi...@git.apache.org>.
Github user sebbASF commented on the issue:

    https://github.com/apache/incubator-ponymail/issues/297
  
    This was fixed as part of #293 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ponymail issue #297: Enh: simplify rights checking

Posted by sebbASF <gi...@git.apache.org>.
Github user sebbASF closed the issue at:

    https://github.com/apache/incubator-ponymail/issues/297


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---