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

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.

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.

SMS gateway for Dynamics 365

First of all, I have to say that I am NET developer (C#) and my knowledge on Dynamics 365 is pretty limited. Nevertheless my employer thought that I am good enough to make that thingy from post title :)
After couple of hours researching and reading, I found this video https://www.youtube.com/watch?v=6LwZLoXS6jo which address on how to create and send SMS from Dynamics. I am aware that this require me to create new Dynamics entities, at least SMSMessage and SMSMessageTemplate, but at least I found out how to do this :)
I understood everything stated there, but as i already said, due to my lack of knowledge on Dynamics 365, I got problems with (probably) basic things regarding Dynamics.
Here are those problems:
1. As far as I can tell, in order to build SMS gateway, first thing I need to do is to add new menu item inside Dynamics 365. I presume that this new menu item should reside inside 'Contacts' menu (contacts.jpg, marked with red box) but I am not sure on how to achieve this. Please note, I do not want someone to provide me with some magic solution, I just need someone to provide me with valid links that I can use to learn about this and solve my own problem :)
2. When new menu item is in place, and user click on it, I would like to open up a form for user to select SMS template that will be used and maybe setup some other values. Same again, U do not need to help me with exact code, just with some usable links :)
3. Inside that form that user will open on menu click, I would like to know how to get list of selected contacts (from grid at contact.jpg)
When I (finally) have that list of contacts, I will create SMS entities mentioned above (video link) and everything will fall in place and (hopefully) work.
I am aware that this is probably too much to ask, cause Dynamics 365 is rather complex, and people are spending great amounts of money and their time learning to became Dynamics developers, but without help, Dynamics is making me running in circles chasing my own tail :) and getting nowhere.
Also, I will be using online Dynamics 365 so bare in mind that any solution should work with it.
if any of U think that I missed or got something wrong, please let me know.enter image description here
So basically to get you started, you should:
1) Create a solution in Settings => Customizations => Solutions
2) Add contact entity to that solution (by choosing "Add existing" under Entities pane). Don't click "Add all assets" you will need only contact metadata to get going
3) Create jScript file and add a web resource to CRM (nothing really complicated, just go to web resources in you solution and click "Add new" and specify type of your web resource as jScript and target your file).
4) Now download http://www.xrmtoolbox.com
5) For now you are interested only in plugin "Ribbon Workbench"
6) Now simply choose your solution and contact - you will see command bars for contact homepage, list and form. This is pretty strainghtforward - simply drag and drop a button wherever you like, create a command using workbench and bind the button with the command (simply choose it from a drop-down). The command you are interested in is Custom Javacript. Here you specify your web resource and name of the function that you want to call. You can also specify parameters that should be passed inside your function for example ids of selected items (if you are on the list of records).
There are many approaches to fulfil your specific needs, but being able to call a custom javascript function from a button should be a good starting point, the rest is simply the knowledge of CRM SDK, so how to create an entity using API or open a form or open a web resource - everything is very well documented and you can get it simply by asking google, so I will not post any blog here, not to advertise too much. Also I's suggest downloading latest CRM SDK (https://www.microsoft.com/en-us/download/details.aspx?id=50032) - you have many sample code there, regarding plugins and some form modifications, you should also check this out.
To make it easier for you, you should refer to this "menu" as "Command bar" or "Ribbon", so rather look for "adding custom button to command bar CRM 2016" and you will be all good. Also to make a form for choosing a template, you will probably need some custom web resource, so "creating custom html5 web resource CRM 2016" should give you some good examples.

Avoid creation of objects through SAP GUI

As a tester, I'd like to know whether it is possible to restrict the manual creation of new objects by the user. The restriction should be done programatically in ABAP, not by removal of permissions.
Background information: we have quite complex objects which are hard to set up manually. Therefore we have implemented a wizard, which does all the condition checking etc. when creating the object. Also, if the wizard shall work, the user must have appropriate permissions to create the object.
Is it possible to remove the object type for that complex object from the list which appears when creating a new object (pressing the New button)?
As I'm only a tester for this part of our software, I can't show any existing code. I just got the feedback "It's not possible" and that's hard to believe for me at the moment. Usability really suffers, because people try to create those objects manually and can't make it work.
I also don't need a working code example, just a hint (class or method or setting) for the developer where to find a solution. I'll then insist that he implements it :-)
Update
Today, the user can click the "New" icon. Then, a dialog appears with 4 choices. 3 choices are for simple objects which he shall create like this. However, the first item in that list is for the complex object, which is impossible to create manually (why we have the wizard). I'd like to know whether it is possible to remove that item from the list programatically.
ᵺṓᵯᶏᵴ, the information you have provided is still a bit vague. However, here is an idea that may work for you.
It might not be possible to completely automate this process, but you could ask your developer to enhance the code that processes the New button, so that it would reject any attempt to bypass the wizard for the first item on the list.
Your developer can tell you if it is feasible in your case, to have the enhancement raise an error (message of type E) to stop the user from proceeding.
This would have to be combined with end-user training to tell people to avoid the New button for that item, and use the wizard instead
ᵺṓᵯᶏᵴ, it looks like a custom dialog so it should be possible to remove it the option, alternatively if it is a standard dialog in a SAP app there is always a way to restrict it, it can be as simple as disallow entry from specific transaction codes. for example the developer could set a variable at the start of the wizard and then check for that variable when creating the object, if it not there he can show a dialog "Please use the Wizard we carefully crafted for your use......" Ok maybe you wont say all of that but you get it.
So the answer to your query is yes it can be done but the approach will depend on what it is your changing custom or standard object etc,.
Later..

Web Dynpro for ABAP Explanation Text (Green Underline) not working for certain users

I have recently added Explanation text to certain fields on the SRM Contract screen (both standard and cusom fields). The user that I unit tested with worked fine, however most other users do not work. After investigation I've found that it is not just the Explanation Text that I've added, but all Explanation Text that is missing.
According to the sap help entry the behaviour is similar to what I would expect for Help mode = off.
Is it possible to turn Help mode on or off on a per user (or role) basis, and where should I look to find this?
you already found it: SAP Help says:
"You can activate the help mode either in the personal settings in the portal or in the associated URL Parameter" ... means in personal Settings, but I feel that you want it globally not on personal base or in the associated URL Parameter. The latter means you'll have to find the application in the Portal Content, there you can find URL Parameter and i would try adding HELPMODE=ON... does this help you?
start by rightclicking you application "Technical Help" or "..Help" and see what application you are looking for. Then Google the application and add +"Portal Content", I think then you'll find it.
regards, zy

Youtrack Custom field for who raised Issue?

I was expecting this to be a simple thing, but I am not quite sure how to go about doing it.
Basically on the current project we are trialling YouTrack and the agile board is great, but they could do with knowing who raised certain issues in case they need to go question them further on the issue. However I cannot seem to find a simple way to display this information.
I presumed it would be a custom field of type user, but it appears that this would manually need filling in and would not just be able to be pre-populated by the user who is making the task.
So is this possible?
Currently you can view only the assigned user's name on a ticket in Agile board.
I've created a task based on your request http://youtrack.jetbrains.com/issue/JT-19118, you are welcome to vote and leave comments.
As a rough workaround, you can configure notifications on created issues in your projects.
In this way, developers will be notified about all created issues and their reporters.
For that, create a saved search (i.e created by: {Testers}), make this search visible to needed group (by clicking "Edit" on the saved search) and enable notification "on issue created" in user's "Profile". Also, user with admin permissions is able to allow this notifications for all needed users by himself(navigate to "Administration" area -> "Users" -> {user} ->"Profile").
Note, that you can receive notifications both via email and jabber.
Thank you.