Skip to content

Commit cefc442

Browse files
authored
Merge pull request #293 from SAP/regression_fix
disabling profiles when it executes the regression
2 parents 3979684 + 4f1abf1 commit cefc442

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

src/foundation/y_code_pal_service.clas.abap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ CLASS y_code_pal_service IMPLEMENTATION.
153153
RETURN.
154154
ENDIF.
155155

156+
TRY.
157+
y_profile_manager=>create( )->delete_profiles( ).
158+
CATCH ycx_failed_to_remove_a_line.
159+
raise_internal_server_error( ).
160+
response->set_cdata( 'Profiles were not disabled' ).
161+
RETURN.
162+
ENDTRY.
163+
156164
DATA(atc) = NEW cl_satc_api_factory( ).
157165

158166
TRY.

src/profiles/y_if_profile_manager.intf.abap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ INTERFACE y_if_profile_manager
8282
!profile TYPE ytab_profiles
8383
RAISING
8484
ycx_failed_to_remove_a_line .
85+
METHODS delete_profiles
86+
RAISING
87+
ycx_failed_to_remove_a_line .
8588
METHODS delete_check
8689
IMPORTING
8790
!check TYPE ytab_checks

src/profiles/y_profile_manager.clas.abap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,18 @@ CLASS y_profile_manager IMPLEMENTATION.
151151
ENDMETHOD.
152152

153153

154+
METHOD y_if_profile_manager~delete_profiles.
155+
TRY.
156+
DATA(profiles) = y_if_profile_manager~select_profiles( sy-uname ).
157+
CATCH ycx_entry_not_found.
158+
RETURN.
159+
ENDTRY.
160+
161+
LOOP AT profiles ASSIGNING FIELD-SYMBOL(<profile>).
162+
y_if_profile_manager~delete_profile( <profile> ).
163+
ENDLOOP.
164+
ENDMETHOD.
165+
154166
METHOD y_if_profile_manager~get_checks_type_name.
155167
result = checks_type.
156168
ENDMETHOD.

0 commit comments

Comments
 (0)