Jump to content
Vasily

How to prevent server adding/editing/deleting

Recommended Posts

Hello, 
I would like to figure out how to validate the server credentials for my provisioning module during adding/editing a server and prevent the operation and show an error if something is wrong.

Please advise how to do it. 

Can I  use hooks ServerAdd, ServerEdit, ServerDelete for it? if yes, what should I return in the hook callback?

Share this post


Link to post
Share on other sites

Those would be the correct hooks, but they don't support any returns and thus wont help here.   What you could do is use those hooks and redirect back to the server page when your tests fail and set a session variable of "server_error".  Then use an AdminAreaHeaderOutput hook and check for that session variable and display error. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated