Rev | Line | |
---|
[12] | 1 | /** |
---|
| 2 | * Authentication and Authorization service |
---|
| 3 | * @Author Jeroen Wesbeek |
---|
| 4 | * @Since 20091019 |
---|
| 5 | * |
---|
| 6 | * Revision information: |
---|
| 7 | * $Rev$ |
---|
| 8 | * $Author$ |
---|
| 9 | * $Date$ |
---|
| 10 | */ |
---|
| 11 | public class Authorization { |
---|
| 12 | /** |
---|
| 13 | * class constructor |
---|
| 14 | * @void |
---|
| 15 | */ |
---|
| 16 | public def Authorization() { |
---|
| 17 | // debug line for now |
---|
| 18 | printf("instantiated %s\n",this.class.name); |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | /** |
---|
| 22 | * check if a user is authenticated to use this class and / or method |
---|
| 23 | * @return boolean |
---|
| 24 | */ |
---|
| 25 | def isAuthorized(controller,action) { |
---|
[13] | 26 | // logic should be implemented here containing: |
---|
| 27 | // user / sessions |
---|
| 28 | // user authorization per controller + action |
---|
| 29 | // another method should be able to list authorized actions? |
---|
[12] | 30 | printf("calling isAuthorized(%s,%s)\n",controller,action); |
---|
| 31 | |
---|
| 32 | // everything is allowed for now... |
---|
| 33 | return true; |
---|
| 34 | } |
---|
| 35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.