https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38941

--- Comment #25 from David Cook <[email protected]> ---
(In reply to Matt Blenkinsop from comment #24)
> the component that is used in the custom element can be used
> either as a Vue custom element in template toolkit or as a component in a
> Vue application. When used in a Vue app we get access to the pinia stores
> (permissionsStore) and can use the method provided by the permissionsStore
> to check permissions. Outside of a vue app however, we don't get access to a
> populated permissionsStore so we need to be able to accept the permissions
> from the template toolkit variables as component props

Looking back at the patch again, I see that it does support both methodologies
for all cases. On first read, I thought it was using one methodology in one
place and the other methodology in other places. My bad!

That said, can you explain things more? In the case of acquisitions menu, it
looks like you do have access to the pinia stores, but that it's just not being
populated? It also looks like it gets mounted as a single component Vue app in
the end? Looking at bug 38930, it looks like the permissionsStore is not used
anywhere currently? There's the ERM example which shows an ERM-specific
implementation for using the permissionsStore, but that seems suboptimal. 

When I first heard of bug 38930, I thought it was going to introduce a core API
endpoint for fetching current user details and then put the permissions in the
permissionsStore for use by Vue components. Even outside of Vue, I reckon
having an API endpoint to fetch that information would be useful.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to