Solved

Custom API grant issue

  • 15 August 2020
  • 6 replies
  • 1114 views

Userlevel 2
Badge +5

Hi folks,

Wondering if anyone can help with an api grant issue i‘m stuck with? 

Created few procedures within a package on test db, one named as drop_table_ as below (meant for deleting a temporary table content, not dropping as name suggest :smiley: )

Create or replace package body CB_SALES_QUOTATION_API is
 procedure drop_table_  IS
  Begin
    EXECUTE IMMEDIATE 'DELETE FROM ifsapp.CB_NOTE_TEXT_TAB
     where CF$_NOTE_TEXT is not null';
  end drop_table_;

Executing this package via Custom menu rmb which works well with IFSAPP schema .But when i tried executing as a end user i get below message:

 

So far:

  • Granted Package access to the user:

        Grant execute on ifsapp.CB_SALES_QUOTATION_API to XXX;

         Also, Grant execute on ifsapp.CB_SALES_QUOTATION_API to PUBLIC;

  • Granted table access to the user:

         Grant all on ifsapp.CB_NOTE_TEXT_TAB to XXX;

 

Re-logged in as user but still getting above error message on IFS.Strangely, when i use PLSQL dev,

logged in as same user i can execute the api and also delete the table content but not on IFS client using custom menu. 

Any ideas?

 

Thanks in advance

icon

Best answer by dsj 17 August 2020, 14:59

View original

6 replies

Userlevel 4
Badge +8

Change your custom menu to include &AO. As a prefix to the package

Userlevel 2
Badge +5

Hi @Mike.Hollifield - Thanks for your reply. Unfortunately, that didn’t work either.

Regards

 

Userlevel 4
Badge +8

What does the custom menu Sql block look like?

Badge +1

Maybe try to run ‘Reconfigure’ on application server. AFAIR if it’s completely new package (or maybe even new function or procedure in package that already existed) it was necessary to be able to use it in custom menu code.
I had similar issue and it started to work after reconfiguration but I’m not 100% sure if it was working even with IFSAPP schema before that.
 

Userlevel 7
Badge +20

May be grant to IFSSYS is what missing here? Run following command and see if it helps.

begin
installation_sys.grant_ifssys();
end;

If it doesn’t help, re create the package according to IFS standards, grant permission from Permission set/Database objects and see if it works.

Following post explains how to create the package to show in IFS permissions.

https://community.ifs.com/technical-issues-101/is-there-a-way-to-run-custom-apis-as-scheduled-database-tasks-2868

Userlevel 2
Badge +5

Thanks all for taking time to reply.

Went through Permission set way and all working fine now :)

Regards

Reply