Register.post.post_process script not working for new user registeration


#1

Hi everyone,
I am a dreamfactory newbie and i am wondering if anyone knows a fix for this problem, What i want to do is to create a post request after user registration to insert some extra information in my DB about the user.
i created a role for users who register to my application and gave it access to all my DB tables in addition to System access to Script Component (Even tried to give access to all components). And i added some code in user.register.post.post_process just to create the post request.
In the logs i get the error “Access to application ‘dsp.scripting’ is not provisioned for this user’s role”

I noticed that when I am i put the same code in pre_process scripts it works normally! I think that after registration, the new user gets a session that is not allowed to execute scripts.
I am not sure if i am doing it the right way or there is some better way to do it so suggestions are highly appreciated

I am using dreamfactory 1.8.2 on windows.


#2

Your issue is caused by a functional limitation with the scripting system…non-admin roles currently can’t access script resources with admin privileges (in the context of a given script).

This limitation will be resolved in the next release which comes out early January. Sorry about the wait, this is something we’ve been meaning to do for awhile. Stay tuned, we’re close.


Run script as admin
#3

Thanks a lot Ben for your feedback, I am just confused about one thing, The script runs correctly if I it’s in the pre_process event, so is it possible for a non-registered user to execute a script but a newly registered user is not allowed to execute any?


#4

Tarek,

You could solve this problem using server-side scripts on the pre_process. Set a certain time during which a user is considered “new” and give permission to the non-registered user to execute this script. Seems a bit backwards, however, I’m interested in your logic here. It’s almost like the nature of canned foods and its ability to sway between being a highly needed item and just regular old canned goods. all (most for sure) is done within the permissions tab within the administrative console of your dsp. have a meerryy christmas


#5

Ben! Thanks a Million. This bunch at the Dreamfactory is a rich one with great talents. So caring and diligent with the work shows through the app evolution.

A couple questions:

  1. Thoroughly I have understood the fundamentals of the DSP Platform. What is exactly meant when everyone refers to this “revolutionary” API as a platform as a service - should it not exist on the same playing field as other world-wide leaders in the area within PaaS products?

  2. Ben! Could you have the foresight to enlighten me please"? Evangelists’ sole responsibilities cannot simply be to back a software service without having a passion for it oneself. Then why. Why Dreamfactory? What is it’s limitations? Does it have limitations? I’d like a software that could do it all for me. Hungry? pizza. Tired? pillow… then repeat for following days. My question here for you Ben is what do you think the DSP will look like in ten years? Hopefully not like my old Oregon Trail games… these games broke before I made it to Oregon even.

  3. Believe me on this as I am not intending to achieve a mood of sarcasm. I just think it would be a devastating shame if dreamfactory did not “start-up” and “prosper” as anyone with two pennies in his pockets should. I know that there have been new feature implementations. Feedback from actual users you must know to take with a grain of salt but karats of gold are scattered throughout this forum and the DSP Ideology.

  4. and final .Man. Ben. It seems like there are significant patterns out there as far as the issues in the DSP forum. Can’t you get someone too simply address these main bottlenecks, then functioning as one group from the back to the front of the app?

imagine. create. change. be the revolution. win.

Terms I couple with DreamFactory’s PaaS. I have not struggled doing that until today. I can help as much as possible, but… it’s more than distasteful to see now more than ever the sluggish response time to users’ questions.

Tis’ the holiday season… Yes, I know. But…Ben… man… how will you convey, ha… this is the best part… …convey…in a way that the masses will understand. They need to only understand one thing:

DreamFactory. It is all we need.

Keep working hard. And come on… these response times?.. Santa Clause is coming to town. Ha! Beautiful thing of Santa is that he comes on the 23rd and 25th. It’s odd. I know.

Pay me later for this little nugget: is it at all possible to have people from all walks of life look and feel about the DSP as they once did about Christmas?.. or hopefully still do… Imagine… It’d be like when DSL came out.

Ahh, the world then would become too much of a happy place… we all know: more to life than happiness. Keep up the good work, but a fish will only stay on the line so long until it says “peace. out.”

That being said. I challenge you. Aim for the aforementioned feat. Basically, it’s the bee’s knee’s and people are slowly catching on… No one has time for slow!! Hell of a smart guy, best and brightest. Good stuff, Ben and kind regards.

Respect. and, enjoy a warm Christmas.

  • Santa

#6

Not sure why that script would work as a pre_process event. I’ll point this out to Lee, who is working on this right now. What is the pre_process event by the way?


#7

@objectiveneo glad to see you back here. we’re trying to keep up on the forum, but we’re a very small team at the moment and working super hard on the 2.0 release which should be a BIG improvement.

we could use a lot of help, let me know if you know any great developers who want to work on the open source project or provide tech support, especially developer evangelists, frontend developers, backend developers, and support engineers. we’re hiring in the states and in europe.

merry christmas!