Limit visability on options

(4 posts) (2 voices)

Tags:

No tags yet.

  1. xerxes42, Member

    Hi,

    Is it possible to hide an input option to a report except for admin users or users of a specific group?

    In the specific case I want to hide a input field where the user can enter an email address unless they are an admin user or member of a specific group. Normal user will have the option to get the report emailed to them but only to the address on their registered account.

    Brgds

  2. myDBR Team, Key Master

    The simplest way to do this is to create a wrapper report for normal users. This report would not have the email-parameter and would just call the original report without a value in the email-parameter.

    Hiding is also possible with JavaScript, but then you would have to check the parameter in the report as some user can use a developer tools in the browser and use the hidden parameter.

    --
    myDBR Team

  3. xerxes42, Member

    Hi,

    I already verify that the user is an admin in the report so even if someone enters data in the email field they will not be allowed to send it.

    Are there any examples in the documentation on how to hide it with Java script? I'm more if a SQL developer so java script isn't my home turf.

    Brgds

  4. myDBR Team, Key Master

    We would advise you to use the wrapper. It is as simple as:

    create procedure sp_DBR_wrapper
    begin
    call sp_DBR_original(null);
    end;

    Where the sp_DBR_original would be visible to admin and sp_DBR_wrapper visible to those user that cannot use the email-parameter.

    --
    myDBR Team


Reply

You must log in to post.