Hi Hannes,
this is a two-liner! Create an subclass of Action called SaveImage and
add the following message:
SaveImage>>execute
" your personal code to save the image "
self response redirectTo: self structure url
This is the absolute minimum you need to write. To evaluate it you
simply browse to
http://localhost:8080/?action=SaveImage
To check for a specific permission, add the following line of code at
the top of the message:
self assertPermission: (Permission name: 'Save Image')
You do not even have to 'declare' the permission, as long as you only
want the admin (the admin-role contains all possible permissions) to be
able to execute this action.
If you want the action to be displayed in the list follow the tutorial
from the documentation (this is just another line of code).
Cheers,
Lukas
--
Lukas Renggli
http://renggli.freezope.org