[FOLIO-548] IfPermission not working with current stripes npms and black box 0.8.0 Created: 06/Apr/17  Updated: 12/Nov/18  Resolved: 11/Apr/17

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: P3
Reporter: Niels Erik Nielsen Assignee: Mike Taylor
Resolution: Done Votes: 0
Labels: sprint12
Remaining Estimate: Not Specified
Time Spent: 7 hours, 15 minutes
Original estimate: Not Specified

Attachments: PNG File Screenshot from 2017-04-11 10-20-10.png     PNG File Screenshot from 2017-04-11 14-06-54.png    
Issue links:
Blocks
is blocked by STRIPES-310 Fix all inter-package Stripes depende... Closed
is blocked by FOLIO-550 Release new versions of ui-users, ui-... Closed
Sprint:

 Description   

Following the quick start guide:

git clone https://github.com/folio-org/stripes-sample-platform
cd stripes-sample-platform
sed -i 's/disableAuth: true/disableAuth: false/' stripes.config.js
yarn install
yarn start

Log in as diku_admin, go to users, no [Add user] button appears
Select a user, no [Edit user] button appears.



 Comments   
Comment by Niels Erik Nielsen [ 06/Apr/17 ]

We'll test again with the next black box. But I've had this working with some combination of git check-outs and black box 0.8.0 (know, since I demoed that at the review Tuesday ) so I suspect something's amiss in the stripes npm's

Comment by Mike Taylor [ 06/Apr/17 ]

In your browser's development tools, go to IfPermission.js. What does it say? (It's only a short file, you can dump its whole contents in a comment.) Do not show me the version in your git checkout, as it may not be the same!

Comment by Niels Erik Nielsen [ 07/Apr/17 ]

It works with our ci repo "npm-folioci", so I've switched to that instead of using the official repo specified in the quick start guide.

Comment by Mike Taylor [ 07/Apr/17 ]

I think the problem here is that the most recent NPM releases of the UI modules (Users, Items, Scan) have dependencies on too-old versions of stripes-components. If I am right, FOLIO-550 Closed will solve the problem.

Comment by Mike Taylor [ 07/Apr/17 ]

Thinking this though, I think the underlying problem comes down to the fact that stripes-core v0.3.0 was a breaking change, and should have had a new major release number, but didn't. So the version of stripes-components that Niels-Erik is getting actually depends on the old stripes-core v0.2.0 API, but it's getting the newer API from v0.3.0ff.

Conclusion (and not a new one): we need to start doing SemVer properly. The next time I make a breaking change to stripes-core, I'm going to v1.x.

Comment by Mike Taylor [ 10/Apr/17 ]

Niels Erik Nielsen, I have made releases of all the relevant packages. Can you please try this again and let me know how it works for you?

Comment by Niels Erik Nielsen [ 11/Apr/17 ]

I have not been able to verify that it's working because there's some issue with the authtoken module in black box 0.8.3

I did

git clone https://github.com/folio-org/stripes-sample-platform
cd stripes-sample-platform
yarn install
yarn start

Tried logging in as diku_admin, but get a 404: No running module instance found for authtoken

Not sure why, a system status for mod-auth says:

Tried against black box 0.8.0 too but I think the UI might not be compatible with that anymore (changes to permissions etc?)

Comment by Mike Taylor [ 11/Apr/17 ]

You are correct – changes in permission names mean that the present ui-users (git head and v1.0.0) is compatible only with v0.8.3 of the black box.

Your permission problem is very strange – I have not seen this. I will try to reproduce. In the mean time you might try bringing the VM down and up again: IIRC, it can sometimes stumble over the startup sequence, and that may be what you're seeing?

Comment by Mike Taylor [ 11/Apr/17 ]

Aha! Looking into this more solves another mystery ...

Comment by Niels Erik Nielsen [ 11/Apr/17 ]

Should we update deps in stripes-sample-platform ?

Comment by Mike Taylor [ 11/Apr/17 ]

Possibly not related, but I see that stripes-sample-platform depends on old versions of the UI modules. I have updated that, and am about to make a newer stripes-core release for it to depend on, too. This may not help with what seems to be a backend problem, but it can't hurt.

Comment by Niels Erik Nielsen [ 11/Apr/17 ]

I think Wolfram Schneider had some success with fetching newer ui versions in the sample platform at least.

Comment by Mike Taylor [ 11/Apr/17 ]

I see we crossed in the post. Yes, I am doing this update – not only in stripes-sample-platform but also in some of the dependent modules, whose specified dependencies are outdated.

You can git pull now to get a better version, but I am not done there yet.

Comment by Mike Taylor [ 11/Apr/17 ]

All our dependencies are ... weird.

I am going to take a while to sort this out. For now, I will just release stripes-connect v0.5.0, but there are deeper waters to navigate here. I will file a separate bug.

Comment by Niels Erik Nielsen [ 11/Apr/17 ]

Oh boy. Thank you, Mike.

Comment by Mike Taylor [ 11/Apr/17 ]

stripes-core v0.5.0 is out:
https://github.com/folio-org/stripes-core/tree/v0.5.0
Please yarn install to upgrade your stripes-core, then see if <IfPermission> works for you.

Comment by Mike Taylor [ 11/Apr/17 ]

(stripes-core v0.6.0 is also out now, so feel free to upgrade; but you don't need that, most likely.)

Comment by Niels Erik Nielsen [ 11/Apr/17 ]

Yay:

This was by

git clone https://github.com/folio-org/stripes-sample-platform
cd stripes-sample-platform
yarn install
yarn start

which pulled in 0.5.0 of stripes-core.

Box 0.8.3

There are no permissions listed in current user menu but that might be as expected.

Comment by Mike Taylor [ 11/Apr/17 ]

Looking good. So can we close this one?

Comment by Niels Erik Nielsen [ 11/Apr/17 ]

Yes.

Generated at Thu Feb 08 23:06:36 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.