Skip to main content
Solved

Custom API grant issue

  • August 15, 2020
  • 6 replies
  • 1288 views

Forum|alt.badge.img+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

Best answer by dsj

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

View original

6 replies

Mike.Hollifield
Hero (Partner)
Forum|alt.badge.img+8

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


Forum|alt.badge.img+5
  • Author
  • Sidekick
  • 15 replies
  • August 17, 2020

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

Regards

 


Mike.Hollifield
Hero (Partner)
Forum|alt.badge.img+8

What does the custom menu Sql block look like?


Forum|alt.badge.img+1
  • Do Gooder (Customer)
  • 4 replies
  • August 17, 2020

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.
 


dsj
Superhero (Partner)
Forum|alt.badge.img+22
  • Superhero (Partner)
  • 828 replies
  • Answer
  • August 17, 2020

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


Forum|alt.badge.img+5
  • Author
  • Sidekick
  • 15 replies
  • August 17, 2020

Thanks all for taking time to reply.

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

Regards


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings