Permissions

If you would like to have special permissions to your module you need to define this in module.php.

If you don't define any functions, permission will only be controlled on a module level. Access to module or not.

If we extend the hello world example to include a list page and an edit page the module definition, module.php, file would contain something like this:

<?php

$Module = array( "name" => "MyModule" );

 

$ViewList = array();

$ViewList["hello"] = array( 'script' => 'hello.php',

                           "functions" => array( 'read' ),

                           'params' => array() );

 

$ViewList["list"] = array( 'script' => 'list.php',

                          "functions" => array( 'read' ),

                          'params' => array() );

 

$ViewList["edit"] = array( 'script' => 'edit.php',

                          "functions" => array( 'edit' ),

                          'params' => array( 'ItemID' ),

                          'single_post_actions' => array( 'StoreButton' => 'Store',

                                                          'CancelButton' => 'Cancel'

                                                          ),

                          );

 

$FunctionList['read'] = array( );

$FunctionList['edit'] = array( );

 

?>

Here we define two functions, read and edit. We also define two new views; list and edit. We give hello and list read permission. Edit is assigned edit permission. This is the only thing we need to do to get permissions on function level in our module.

Comments

Log in or create a user account to comment.

Contents

Development

Extensions
    Translation
    Introduction to extensions
    Building an Exponential module
    Design extension
    Datatypes
    Workflow events
    Module
       Hello world
       Permissions
       Module tutorial (Part 1)
    Template operator
    Template function
Exponential datamodel
Exponential tuning and stability
Importing attribute data
Kernel
Libraries
Scripting
Standards
System overview
Test Suite
Using Doxygen to create API documenta...


Created

11/07/2003
2:26:58 pm
by B�rd Farstad

Last updated

19/10/2004
10:46:20 am
by Yelitza Jaramillo

Authors

B�rd Farstad
Yelitza Jaramillo



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.