How to use all frappe objects in server script?

I want to create a new server script, and i want to create new user permissions in it .
but when i code like this :

frappe.permissions.add_user_permission("Blog Category", "_Test Blog Category 1",

I get an error and it says the permissions object does not exist.
can any one help with this, please?

Hi there,

For security reasons, only a subset of the api is available in server scripts.

If you want to use an object/method not available there, you need to create a whitelisted method that you can call from an app.

1 Like