Limiting access of users to a specific transition (in SimpleScreens's EditInvoice.xml) - moqui

I am testing PopCommerce application. I would like to use the built-in security model to limit access (of my users) to transitions - in my case I do not want all users to change a status of an invoice. On the EditInvoice.xml screen, there are transitions to various Statuses. Could you please help me with that? I am using the MoquiDevConf.xml (default one).
I do not know how to specify the Artifict Type/Pattern for the transition. This is the location of the Screen: component://SimpleScreens/screen/SimpleScreens/Accounting/Invoice/EditInvoice.xml.
Thanks in advance
MR

Related

Performance optimization for route calculations via mouse drag

Our Team is currently working on a car routing web application with the HERE-API. To meet the users expectations, we want to integrate all the typical features everyone is used to nowadays, most importantly the possibility to manipulate a route interactively by dragging waypoints out of it.
While for the most part everything seems to work fine, we are experiencing serious performance issues on long routes combined with large drag distances.
Our applicaton works a follows:
-at first the user has to provide two addresses
-the route is initially calculated using a full calculateroute request (representation = 'display')
-now, when the user drags the route, we request a new route with a waypoint at the mouse position and reduced response data (representation = 'dragNDrop') every 500ms for the time the dragging process lasts
While this procedure is working really well and fast when zooming in to a small section of the route, it is very slow and laggy when zooming out to country size and dragging while the whole route is being displayed. Implementing a throttling mechanism and experimenting with different call rates helped a bit, but not as much as we hoped.
Having a look at the constant performance on wego.here.com, we were hoping that there might be a better way to implement this feature with the HERE-API or maybe some kind of optimization.
We would very much appreciate any help.
Routing API will provide the best solution with respect to the use case. can you please share the API response time or full API request. please check clustering document if it aligns with the use case.
developer.here.com/documentation/maps/dev_guide/topics/clustering.html
if it does relate to the number of request(which cause the implementation of throttling and increase API requests), please connect us at
developer.here.com/contact-us
Thanks for your reply! It had been pretty crazy this year so this post is a bit late - my apologies for that.
The solution to our Problem was a small adjustment to a parameter value. We lowered the value of the parameter 'resolution' to '25:25' for calculateRoute-Requests while doing route draggings.

user login before or after main application part?

Theoretical question. Lets say I build an application for managing clients, products, bills and such. All without a user login.
Is it possible to get multi user (each one with his own clients,products,...) functionality after the main application is done?
Or should I think of the multi user in the first place? How flexible is rails at this part?
thanks in advance
dennym
What you are asking for is a pattern called Multitenant. There are different ways to do it, but none are provided by Rails natively.
You could start with this slide: http://www.slideshare.net/tardate/multitenancy-with-rails
And figure out if you want to do; partitioning based on data, Rbac, model or schema.
There are is one that offers it as a service that says that it is easy to do after you have your application: http://railskits.com/saas/
But in our experience, it was a bit outdated and missing some features that we wanted.
You can also take a look at other gems like: multitenant or act_as_tenant.
We ended up using act_as_tenant and doing it from the beginning.

Is there a way to specify a title for the contacts picker?

The single / multiple contact pickers don't seem to have any way of specifying a title, so the user is suddenly just confronted with the big list of contacts from the people hub.
We can, of course, tell the user in advance but that adds in a level of design limitation (launching from an app bar button for example).
Am I missing the API for this as well or is this currently an unsupported scenario?

Using the Rally API to re-rank multiple stories

I'd been looking at using the Rally API to create an app to do some simple auto-ranking stories based on specific criteria (at the request of / to help out a couple of our Product Owners) in a drag&drop workspace.
I did this by adjusting the "Rank" properties of the sequence of stories (I made sure to keep the rank values within the same overall min / max range as prior to the auto-reorder). I made a call to the API to update each story's rank individually (in quick succession).
Testing the app, I found that sometimes after running the auto-ranking app, some screens (such as the kanban board) would tell me that "drag and drop re-ranking is disabled for manual rank workspaces" (and the kanban would no longer let me drag & drop, although other screens such as the backlog would still let me drag & drop, and the workspace settings were still set to drag & drop). Deleting the stories, or reordering them on the backlog screen would return things back to normal.
After trying a few ideas to solve this, I figured perhaps if I was updating the Rank on a number of stories in quick succession, the back-end might be getting confused with these (potentially several / concurrent) requests. Introducing a delay between each story's API call has seemed to avoid the problem, and to speed things up, I now update a story's rank in the API only after the previous story's rank update has invoked the "updateComplete" function.
Do the assumptions in the last paragraph above make sense based on the backend ranking? Is there any Javascript API call to update multiple stories at once? (Otherwise I'm quite happy with the solution of only calling the API "update rank" after the prior API "rank update" call has returned ok).
That sounds like you discovered a possible issue with the backend ranking. The warning you were getting stems from the board trying to figure out which type of workspace you are in (manual or dnd rank). Since that setting is not currently available via WSAPI the board tries to figure it out based on its data and sometimes gets it wrong.
Currently there is no fully supported/documented way to adjust the ranks of items via WSAPI. The Card Board component in the App SDK uses special rankAbove and rankBelow query string parameters during update calls (which you can see in Firebug or the Chrome dev tools).
How are you currently setting the Rank values?

Content Permissions in Orchard

In an OrchardCms site, I need to create a hierarchical menu where I can show and hide menu items by user role. What is the best way to approach this?
One possible way would be to create and manage two menu's, each pertaining to a different layer where the layer rule species the respective Role. However, this means managing two Menu's which is not ideal. Many items in each menu would need to be duplicated.
Another way would be to create a custom Menu Part. The downside here is it seems like overkill.
Or am I on the wrong track completely, should I be looking more at filtering content items by role instead? In this scenario, I believe I would still need a way to specify menu filters.
I think Advanced Menu (available from the gallery) does menu trimming based on permissions.
Update: my bad. Try Quanta instead (part of the Science project). Should work well with Cartography.
I was able to create multiple menus filtered by role in layers with this simple PCG.RoleLayer module. You will still have to make separate menus though, and it doesn't restrict url access unless you change permissions.
After enabling the module, you can create rules for roles. For example,
role("Administrator")
Would make that layer only visible to those with the administrator role.