Code review comment for lp://staging/~adeuring/launchpad/api-query-permissions-on-object

Revision history for this message
Abel Deuring (adeuring) wrote :

whoops. Most of my reply (sent via mail) was eaten somewhere. Copied from it and pasted into the web form:

Well, the goal of the branch is to provide access information for a page
like
https://translations.launchpad.dev/ubuntu/hoary/+source/alsa-utils/+sharing-details
.

We don't need it for the "state" of the page when it is rendered. But if
a user can changes for example the packaging link, we should present the
button to set the branch linked to the product series, the button to
configure translations for the product and the button to configure
translation synchronisation only if the the user has the permission to
do that -- and we don't know this when the page is rendered.

Aaron had exactly the opposite view: We should use properties because we
get the permission details in the same webservice request that delivers
the object itself, so no need for additional requests when the packaging
is changed, just to let the JS code know which icon to show which not to
show. (Note that we need indeed two requests: one for the new product,
and one for the product series.)

Anyway, what would you suggest? something like a method

Product.userCanWrite('property_1', 'property_2', ...)?

« Back to merge proposal