add authorization exit on startup (#5630)

#5629
This commit is contained in:
Lars Hvam 2022-06-17 11:49:53 +02:00 committed by GitHub
parent 380508d72c
commit ddf1c048a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,10 @@ FORM run.
DATA lx_not_found TYPE REF TO zcx_abapgit_not_found.
TRY.
IF zcl_abapgit_auth=>is_allowed( zif_abapgit_auth=>c_authorization-startup ) = abap_false.
zcx_abapgit_exception=>raise( 'No authorization to start abapGit' ).
ENDIF.
zcl_abapgit_migrations=>run( ).
PERFORM open_gui.
CATCH zcx_abapgit_exception INTO lx_exception.

View File

@ -3,6 +3,7 @@ INTERFACE zif_abapgit_auth PUBLIC.
TYPES: ty_authorization TYPE string.
CONSTANTS: BEGIN OF c_authorization,
startup TYPE ty_authorization VALUE 'STARTUP',
uninstall TYPE ty_authorization VALUE 'UNINSTALL',
create_repo TYPE ty_authorization VALUE 'CREATE_REPO',
transport_to_branch TYPE ty_authorization VALUE 'TRANSPORT_TO_BRANCH',