# Even Script works only for adimin

**URL:** https://community.dreamfactory.com/t/even-script-works-only-for-adimin/1509
**Category:** Server-Side Scripting
**Created:** [September 22, 2015, 1:06pm UTC](https://community.dreamfactory.com/t/even-script-works-only-for-adimin/1509 "2015-09-22T13:06:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jayp](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jayp/32/973_2.png) [@jayp](https://community.dreamfactory.com/u/jayp)
#### Post date: [September 22, 2015, 1:06pm UTC](https://community.dreamfactory.com/t/even-script-works-only-for-adimin/1509/1 "2015-09-22T13:06:47Z")

</div>

Hi Admin,

Love what you guys are doing. I am stuck with a strange issue. I wrote a event script for a db service put.pre\_process which works fine when using Administrator login but fails when using any other login. I tried giving Event system access to the role still the issue is present. Also in the api error message i get a html return as below. Any help is much appreciated.

J

The server has experienced a fatal error. Our administrators will automatically be notified. However, if you would like to report additional information regarding this particular error, please open a case on our [bug tracker](https://github.com/dreamfactorysoftware/dsp-core/issues).

```
<div class="inset">
    <h3>Error 500</h3>
</div>

<div class="error">
    <p class="lead">Internal Server Error</p>

    <h3>Error Details</h3>

    <div class="inset">
        <p>Array to string conversion</p>
    </div>
</div>

```

---

<div class="post-metadata">

### Author: ![formerstaff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/formerstaff/32/1133_2.png) [@formerstaff](https://community.dreamfactory.com/u/formerstaff)
#### Post date: [September 22, 2015, 7:17pm UTC](https://community.dreamfactory.com/t/even-script-works-only-for-adimin/1509/2 "2015-09-22T19:17:48Z")

</div>

This could be a number of things. Is anything logged in your DreamFactory log (other than what is delivered to the API error message?)  
Additionally, did you give your user’s role access to the necessary API components with “script” as the requestor?

---

<div class="post-metadata">

### Author: ![jayp](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/jayp/32/973_2.png) [@jayp](https://community.dreamfactory.com/u/jayp)
#### Post date: [September 22, 2015, 9:47pm UTC](https://community.dreamfactory.com/t/even-script-works-only-for-adimin/1509/3 "2015-09-22T21:47:39Z")

</div>

Thanks. It was because “script” access was not given. Thanks ton. Should have asked you guys in advance. Wasted lot of time in the last week figuring out the root cause. Only yesterday found it is working only for admin. A error handling message could have helped.

Thanks again.

J
