bm_delete_permission_p (public)

 bm_delete_permission_p bookmark_id

Defined in packages/bookmarks/tcl/bookmarks-procs.tcl

Returns boolean value indicating if the browsing user may delete the bookmark.

Parameters:
bookmark_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 bm_require_delete_permission bm_require_delete_permission (public) bm_delete_permission_p bm_delete_permission_p bm_require_delete_permission->bm_delete_permission_p packages/bookmarks/www/bookmark-edit.tcl packages/bookmarks/ www/bookmark-edit.tcl packages/bookmarks/www/bookmark-edit.tcl->bm_delete_permission_p ad_conn ad_conn (public) bm_delete_permission_p->ad_conn ad_decode ad_decode (public) bm_delete_permission_p->ad_decode db_string db_string (public) bm_delete_permission_p->db_string

Testcases:
No testcase defined.
Source code:
    set browsing_user_id [ad_conn user_id]

    return [ad_decode [db_string delete_permission_p "select count(*) from bm_bookmarks 
    where acs_permission.permission_p(bookmark_id, :browsing_user_id, 'delete') = 'f'
    start with bookmark_id = :bookmark_id
    connect by prior bookmark_id = parent_id""0" "t" "f"]
Generic XQL file:
packages/bookmarks/tcl/bookmarks-procs.xql

PostgreSQL XQL file:
<fullquery name="bm_delete_permission_p.delete_permission_p">
    <querytext>
select count(*) from bm_bookmarks bm, bm_bookmarks bm2
    where bm.tree_sortkey between bm2.tree_sortkey and tree_right(bm2.tree_sortkey)
      and bm2.bookmark_id = :bookmark_id
      and not acs_permission__permission_p(bm.bookmark_id, :browsing_user_id, 'delete')
      </querytext>
</fullquery>
packages/bookmarks/tcl/bookmarks-procs-postgresql.xql

Oracle XQL file:
<fullquery name="bm_delete_permission_p.delete_permission_p">
    <querytext>
      select count(*) from bm_bookmarks 
	where acs_permission.permission_p(bookmark_id, :browsing_user_id, 'delete') = 'f'
	start with bookmark_id = :bookmark_id
	connect by prior bookmark_id = parent_id
      </querytext>
</fullquery>
packages/bookmarks/tcl/bookmarks-procs-oracle.xql

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