Security Module Menu - isis

I'm using this security module
<groupId>org.isisaddons.module.security</groupId>
<artifactId>isis-module-security-dom</artifactId>
(isis version 1.16.2).
When I start the app the security function links(all roles, all packages.. ecc) are shown into the 'Other' menu(where I defined the 'unreferenced action'). I'm using a menubars.layout.xml, I can add other menus but I don't know how can I add security. Can someone help me? Thanks in advice

I look into sources and I found a solution. I don't think that is the best way but I manually added the actions into my menubar.layout.xml.For example:
<mb3:section>
<mb3:serviceAction objectType="isissecurity.ApplicationUserMenu" id="findUsers">
<cpt:named>Find Users</cpt:named>
</mb3:serviceAction>

Related

How can i introduce my own permission in a plugin

I would like to write an plugin for the cockpit app. The feature i would like to add includes also an additional item in the drop-down menu. However i also would like to introduce my own permission. If the role of the user has the permission the item in menu will be shown otherwise not. Is this possible at all? And how does at look like? I checked the online documentation but couldn't find anything about it. I hope someone could help me...
The only way to introduce new permissions is through a microservice in its manifest. With purely UI you cannot add those.
As an alternative you could base your plugin on any property of the user. You probably would than want to have a second plugin to set/manage this for a user.

Is there an existing concept for handling permission in a vaadin JPAContainer?

I have a vaadin application using JPAContainer an want to implement some sort of access control. The container should filter all entities that the user is not allowed to read and restricts modification to those users explicitly allowed.
My question is now if there is an existing solution to help implementing this. I searched for it and didn't find anything. Not even a discussion or description of a concept. So i assume the answer is "No" and I'm basically asking to provide a better search result for the next one looking for this.
Nevertheless would I be happy if someone points me to something that helps me implementing this properly.
Thanks
Raffael
There is no such a thing in jpacontainer nor in vaadin.
Vaadin applications are secure and safe if say, the "Edit" or "delete" button is not visible, there is no way to hack it. Or you can have the button disabled only, but do not attach a click listener to it if the user has no permission to do it.

Need Help in social engine signup process

HI please help me in the sign up process of social engine,
I need to add a country/state/city cascading dropdowns on my signup process.
I know how to do it in PHP ajax but finding the hard time to do it in this social engine framework.
Can any one help me in this!!
Thanks
You can use admin panel. You need menuitem Settings > Profile Questions. Then choose needed profiletype and add question with type 'selectbox'.
If you need cascading dropdown in wider meaning, you may use jxlib putting all code into application/modules/User/views/scripts/signup/form/fields.tpl
I have also solved this by using jquery.
You could get the id of the two field involved and then use jquery to add the options of the select field.

yii: serve a file when logged in

I have pdf files in a htaccess-protected directory that I want to show to some users in Yii application.
How is best to solve that? I understand it should be done inside Yii, not with a separate script as it needs to check if a valid user is logged in.
Access control filters
You would do your appropriate security checking (user is in group, or has permission or whatever) and then you would use readfile or something similar.
Do you have code already that isn't working? Or did you just need help with what approach to take?
Thanks!
I got some idea from this link:
http://harrybailey.com/2011/07/yii-rewrite-files-or-images-for-download-or-display/
In short: made a new actionfunction into controller and in that function sending headers and readfile.

Can I use/adapt the Kohana userguide module to create help pages for my application?

I'd like to create a userguide for the application I'm building using the Kohana framework, and I'm wondering if there's a way I can use the Kohana userguide module for this purpose.
I understand how to add userguide info for new modules that I create, and how to include my classes in the API, but I want to build a second, separate userguide for the actual application user, as opposed to the app developers.
At first, I thought I'd just try adding app help pages to the main userguide at APPPATH/guide. I tried adding a "application/guide" directory, and put a file in there called menu.md, but that just ended up replacing the Kohana menu in the userguide. After renaming the file to menu.myapp.md, it doesn't show up at all.
So then it occurs to me that I could simple edit modules/userguide/guide/menu.md to add sections for my app, and likewise add markdown files for each app component. But really it would be much better to have a completely separate userguide for app users since the Kohana documentation isn't relevant for them.
What's the best way to go about this? Should I create a duplicate of the entire userguide module and modify the routing, &c.? Or is there some way to set up both userguides using the one version of the module? Or am I barking up the wrong tree altogether? Is there some other module/approach that would be better for building "Help" pages for the app?
Thanks in advance for your help!
Yes, you can make docs for your application with the userguide. If you want examples, check out these links:
https://github.com/zombor/Auto-Modeler/blob/master/config/userguide.php
https://github.com/zombor/Auto-Modeler/tree/master/guide/auto-modeler
Note that you'll still get "api docs" and everything else, unless you change the config to hide them.