mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
move auth definitions to interface
This commit is contained in:
parent
6a75a0922c
commit
aefaa9f730
|
@ -2,13 +2,13 @@
|
|||
*& Include ZABAPGIT_AUTHORIZATIONS
|
||||
*&---------------------------------------------------------------------*
|
||||
|
||||
TYPES: ty_authorization TYPE string.
|
||||
|
||||
CONSTANTS: BEGIN OF gc_authorization,
|
||||
uninstall TYPE ty_authorization VALUE 'UNINSTALL',
|
||||
END OF gc_authorization.
|
||||
|
||||
INTERFACE lif_auth.
|
||||
TYPES: ty_authorization TYPE string.
|
||||
|
||||
CONSTANTS: BEGIN OF gc_authorization,
|
||||
uninstall TYPE ty_authorization VALUE 'UNINSTALL',
|
||||
END OF gc_authorization.
|
||||
|
||||
METHODS:
|
||||
is_allowed
|
||||
IMPORTING iv_authorization TYPE ty_authorization
|
||||
|
@ -27,7 +27,7 @@ CLASS lcl_auth DEFINITION FINAL.
|
|||
PUBLIC SECTION.
|
||||
CLASS-METHODS:
|
||||
is_allowed
|
||||
IMPORTING iv_authorization TYPE ty_authorization
|
||||
IMPORTING iv_authorization TYPE lif_auth=>ty_authorization
|
||||
iv_param TYPE string OPTIONAL
|
||||
RETURNING VALUE(rv_allowed) TYPE abap_bool.
|
||||
|
||||
|
|
|
@ -321,7 +321,7 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION.
|
|||
|
||||
CLEAR lv_crossout.
|
||||
IF mo_repo->is_write_protected( ) = abap_true
|
||||
OR lcl_auth=>is_allowed( gc_authorization-uninstall ) = abap_false.
|
||||
OR lcl_auth=>is_allowed( lif_auth=>gc_authorization-uninstall ) = abap_false.
|
||||
lv_crossout = lif_defs=>gc_html_opt-crossout.
|
||||
ENDIF.
|
||||
lo_tb_advanced->add( iv_txt = 'Uninstall'
|
||||
|
|
Loading…
Reference in New Issue
Block a user