I have system, where I have different developers. What I need is, that certain people can't call certain functions.
Problem is that for example there is a function/method which deletes a user. Now if I have a developer, who works on UI, I don't want him/her to use such a function/method.
Even id I can disable all the functions/methods, it would help. So basically I have certain classes, what a developer can use (eg Action or something). Now I would be interested in disabling basically all the functions/methods for all other classes. May-be there will be some functions I need him/her to use, but then those can be implemented in the same class or something. But the main problem is disabling all the other functions/methods.
It would be nice to have a wrapper or like a namespace, where a developer can play without harming the other system.
Any ideas? I think having to check caller for each of function/method is not a solution. I'm looking for something where I can make a separate space for a developer without changing all of my 100++ classes.
using php 5
Disabling method/function call
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Well yes, currently the plan is that whey can work their own. So, the option where I check their code, is out.
API, yes. I was more interested whether it can be done more easily. System will have like 100 different Actions, which will be written by different people. They can't access (read/write) my core classes. SO, they have their own sandbox. But they still could access my class, which I have defined for core functionality.
If I could undefine a class or undefine a function, it would be enough.
Another possibility is to check the content of the Action file before including it and removing forbidden functions/methods from the code. Which of course is a very bad solution.
API, yes. I was more interested whether it can be done more easily. System will have like 100 different Actions, which will be written by different people. They can't access (read/write) my core classes. SO, they have their own sandbox. But they still could access my class, which I have defined for core functionality.
If I could undefine a class or undefine a function, it would be enough.
Another possibility is to check the content of the Action file before including it and removing forbidden functions/methods from the code. Which of course is a very bad solution.