Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Client contact to access to batches #893

Merged
merged 4 commits into from Jul 12, 2018
Merged

Conversation

Espurna
Copy link

@Espurna Espurna commented Jul 11, 2018

Description of the issue/feature this PR addresses

This PR will allow Client users to visualize Batches related with the client that the user belongs to.

Not yet done:

  • Client contact should not be able to see batches from other clients in the general Batch Folder

Current behavior before PR

Client contact do no see Batches folder in navtree neither can see batches in client's batches tab.

Desired behavior after PR is merged

Client contact has access to batches

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@xispa xispa changed the title Client contact has access to batches Allow Client contact to access to batches Jul 12, 2018
@xispa xispa merged commit f716a8f into master Jul 12, 2018
@xispa xispa deleted the clientcontact-batch branch July 12, 2018 06:46
@xispa
Copy link
Member

xispa commented Jul 12, 2018

Hi @Espurna , I noticed this Traceback after the merge when running the upgradestep:

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.GenericSetup.tool, line 1053, in manage_doUpgrades
  Module Products.GenericSetup.upgrade, line 166, in doStep
  Module bika.lims.upgrade, line 55, in wrap_func_args
  Module bika.lims.upgrade.v01_02_008, line 34, in upgrade
  Module bika.lims.upgrade.v01_02_008, line 65, in client_contact_permissions_on_batches
AttributeError: allowedRolesAndUser

Please open a PR with a fix asap, thanks

xispa added a commit that referenced this pull request Jul 13, 2018
xispa added a commit that referenced this pull request Jul 13, 2018
ramonski pushed a commit that referenced this pull request Jul 19, 2018
* Revert "Fix for error: "AttributeError: allowedRolesAndUsers" (#894)"

This reverts commit 17f12d6.

* Revert "Allow Client contact to access to batches (#893)"

This reverts commit f716a8f.

* Undo permission changes done because of #893

* Function accepts a list of permissions

* Simplify upgradestep

* Merge upgradestep
@Lunga001
Copy link
Contributor

Lunga001 commented Jul 27, 2018

Hi I'm not sure if this the right place to comment on but I still get the error Fix for error: "AttributeError: allowedRolesAndUsers described at #894.
Line error is: https://github.com/senaite/senaite.core/blob/master/bika/lims/upgrade/v01_02_008.py#L116, maybe we can use get_local_roles() instead of allowedRolesAndUsers. See link for get roles on an object I think get_local_roles() works on the brain aswell

@xispa
Copy link
Member

xispa commented Jul 29, 2018

@Lunga001 I just noticed now your comment. This PR was reverted. After updating the code you shouldn't have problems with upgradestep v01_02_008

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants