User management and external access to Jsreport Studio
-
Hello Jsreport Team!
So my question is that I would love to know if it was possible to access a (paid obviously) Jsreport studio as an external user, but have limited rights on what that user can do with the studio (by example can't change recipe, or use a specific already included data sample and cannot modify it)?
I went to read the provided (ver nice by the way) documentation but couldn't find an answer about this specific case
Also templates that would be created by those users will be linked to their account so other users (except Admin) would not be able to see others templates.
Is there a way to do such thing that already exist, if yes where could I find proper documentation to guide me in such process. If no do you have any hints on how I could achieve this?
(for starting we might be limited to only one jsreport server by the way)
Thank you in advance for your time!! :)
-
Also templates that would be created by those users will be linked to their account so other users (except Admin) would not be able to see others templates.
This is how the current permission handling works, try to create new user, login with it and create new templates. These templates are by default visible only to this user.
https://jsreport.net/learn/authorization
if it was possible to access a (paid obviously) Jsreport studio as an external user, but have limited rights on what that user can do with the studio (by example can't change recipe, or use a specific already included data sample and cannot modify it)
We don't have permission rules that would block changing the recipe. However you can give particular user only read permissions to the particular sample data and he won't be able to modify it. See the
permissions
menu in the left studio panel after selecting data item.
-
Thank you for the fast answer, effectively I just read about the template ownership, might have missed that one on my first reading :/
About
permissions
, just to clarify things beforehand, I could see that you could only setread
oredit
permissions, does that means you cannot hide sample data to specific user?About the functionnality access, do you think I could try and make a custom extension to handle it? If so which part of jsreport could be concerned that I should look into it?
Thanks again!
-
About permissions, just to clarify things beforehand, I could see that you could only set read or edit permissions, does that means you cannot hide sample data to specific user?
User without read and write permissions should not see the particular object.
About the functionnality access, do you think I could try and make a custom extension to handle it? If so which part of jsreport could be concerned that I should look into it?
In the UI, I believe we don't have extension points for changing recipe so you would have to fork the jsreport studio itself.
Maybe you could try to fully describe what you want to reach so I can give you better advice.
-
Got it about standard
permissions
! Thanks again!!In the UI, I believe we don't have extension points for changing recipe so you would have to fork the jsreport studio itself.
Maybe you could try to fully describe what you want to reach so I can give you better advice.Alright, so I'll try to be as clear as I can (feel free to ask if there stills darkness arround)
The need we have for Jsreport is to generate reports for severals customers in order to replace the paper support that they are currently using, this as an an extension of our own application. If some will be okay to use a default template, some will like to keep their original design. The thing is that we are growing faster our customers list than anticipated and we will need some partners to provide those specifics templates. Therefore we will need to allow access to those partners to our Jsreport Studio so they can work on those templates while not impacting the already integrated templates (which can be done with
permissions
).Now we also want to have a control over what functionnalities they could use, like
recipes
choice limitation or adding extra scripts or data files.for example:
- User1 need to create massive reports and in large quantities:
PhantomJs
seems to be the best choice for that person - User2 need to create reports with ToC or/and links:
wkhtmltopdf
seems a better fit in that case - however if User1 and User2 see each of the
recipes
they might want to try it and send us the final template with the wrongrecipe
according to their needs
Also none of those templates the externals users will produce should not be accessed by the application, only those that we did (idealy automaticaly) validate beforehand and then integrate should be! on that last point I suppose it will obviously be our doing to manage it! Thought a tool that could allow us to access the
tag
of a template from outside could help us in this case (is this even possible?)Thank a lot again!
- User1 need to create massive reports and in large quantities:
-
forgot to add the control over tags creation/usage too! provide a set of tags to users so they use only those and not custom ones!
-
Now we also want to have a control over what functionnalities they could use, like recipes choice limitation or adding extra scripts or data files.
It would be quite trivial to to throw error dialogs from the servers custom extension. So a user would see wkhtmltopdf recipe, but it would give him error with explanation when he tries to run it. The similar would apply if he tries to create new data item. Maybe such solution would be enough for you?
Also none of those templates the externals users will produce should not be accessed by the application, only those that we did (idealy automaticaly) validate beforehand and then integrate should be! on that last point I suppose it will obviously be our doing to manage it! Thought a tool that could allow us to access the tag of a template from outside could help us in this case (is this even possible?)
I'm not sure I get this part. However you can get tags information through standard jsreport odata api, if you mean this https://jsreport.net/learn/tags
-
It would be quite trivial to to throw error dialogs from the servers custom extension. So a user would see wkhtmltopdf recipe, but it would give him error with explanation when he tries to run it. The similar would apply if he tries to create new data item. Maybe such solution would be enough for you?
Maybe this could work indeed, but then wouldn't the user ask why he/she can see it if he/she cannot use it? :/ This is why I was thinking about hiding it from non authorized user sight (maybe just implementing a style display=none on that element if user not listed to have access to it?)
I'm not sure I get this part. However you can get tags information through standard jsreport odata api, if you mean this https://jsreport.net/learn/tags
For the last one the idea would be to get the status of a template through its tags as I could see I could retrieve the short id :
"tags":[{"shortid":"B1KYq5ypg"}]
through yourAPI
but how do you get that short id? is this abase64(tag_name)
hash? Or would it be better to retrieve the short_id first by tag_name with api then use the retrieved short_id to filter templates?
Tag that would be added to a report by its creator
-
Maybe this could work indeed, but then wouldn't the user ask why he/she can see it if he/she cannot use it? :/ This is why I was thinking about hiding it from non authorized user sight (maybe just implementing a style display=none on that element if user not listed to have access to it?)
Yes, such solution would be much better for users. You can try to take a shot with modifying the styles through custom extension. The
reactjs
doesn't like meddling with the underling structure so much. However worth it to take a shot.For the last one the idea would be to get the status of a template through its tags as I could see I could retrieve the short id :
"tags":[{"shortid":"B1KYq5ypg"}] through your API but how do you get that short id? is this a base64(tag_name) hash? Or would it be better to retrieve the short_id first by tag_name with api then use the retrieved short_id to filter templates?The
shortid
is some kind of id. It has nothing to do with name. Its purpose is actually to make the references valid even if you rename the objects.
I'm afraid the currentodata
won't support complex query like: give me all templates with particular tag.
However you could easily solve this in custom extension - expose your api path/api/byTag/tagName
and do the mongo like query you like to our document store abstraction.You should probably start with these links
https://jsreport.net/learn/custom-extension
https://jsreport.net/learn/extending-studioAlso, I think someone from us would be available to do the custom implementation for you as a paid service. Don't hesitate to drop us mail If you would be interested in such consultancy service.
-
Thanks for all those precious informations! I'll try to see what I can do from the documentation you provided, and if I cannot achieve this myself then maybe drop you a mail as you suggested!
Again thank you very much for your help, if I do manage to do what I want maybe I coud share it with the jsreport team if this become a need for other people than us in the future! :)