pa_grant_privilege_to_creator (public)

 pa_grant_privilege_to_creator object_id [ user_id ]

Defined in packages/photo-album/tcl/photo-album-procs.tcl

Grants a set of default privileges stored in parameter PrivilegeForCreator on object id to user_id. If user_id is not specified, uses current user.

Parameters:
object_id (required)
user_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 pa_load_images pa_load_images (public) pa_grant_privilege_to_creator pa_grant_privilege_to_creator pa_load_images->pa_grant_privilege_to_creator packages/photo-album/www/album-add.tcl packages/photo-album/ www/album-add.tcl packages/photo-album/www/album-add.tcl->pa_grant_privilege_to_creator packages/photo-album/www/folder-add.tcl packages/photo-album/ www/folder-add.tcl packages/photo-album/www/folder-add.tcl->pa_grant_privilege_to_creator ad_conn ad_conn (public) pa_grant_privilege_to_creator->ad_conn db_exec_plsql db_exec_plsql (public) pa_grant_privilege_to_creator->db_exec_plsql parameter::get parameter::get (public) pa_grant_privilege_to_creator->parameter::get

Testcases:
No testcase defined.
Source code:
    if {$user_id eq ""} {
    set user_id [ad_conn user_id]
    }
    set grant_list [split [parameter::get -parameter PrivilegeForCreator] ","]
    foreach privilege $grant_list {
    db_exec_plsql grant_privilege {
        begin
          acs_permission.grant_permission (
            object_id  => :object_id,
            grantee_id => :user_id,
            privilege  => :privilege
          );
        end;
    }
    }
Generic XQL file:
packages/photo-album/tcl/photo-album-procs.xql

PostgreSQL XQL file:
<fullquery name="pa_grant_privilege_to_creator.grant_privilege">
    <querytext>
        
        select acs_permission__grant_permission (
        :object_id, -- object_id 
        :user_id, -- grantee_id
        :privilege -- privilege  
        )
        
      </querytext>
</fullquery>
packages/photo-album/tcl/photo-album-procs-postgresql.xql

Oracle XQL file:
<fullquery name="pa_grant_privilege_to_creator.grant_privilege">
    <querytext>
      
	    begin
	      acs_permission.grant_permission (
	        object_id  => :object_id,
	        grantee_id => :user_id,
	        privilege  => :privilege
	      );
	    end;
	
      </querytext>
</fullquery>
packages/photo-album/tcl/photo-album-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: