Information Systems:InfoNet User Authorities

From uniWIKI
(Redirected from InfoNet User Authorities)
Jump to navigation Jump to search

InfoNet runs in a browser, which means it can be accessed from anywhere that has an internet connection.

User Authorities

The user signs on with their System i user ID and password (which is validated against the i user profiles), but what they can see in InfoNet is controlled by the file WEBPRDD / INUSERP, which is maintained through Admin / User Authorities. Note that this maintenance can only be done by I.T or administrators (Nancy and John).

This controls the functions the user is allowed to do, and the information they can see.

Websmart-2.jpg

User Defaults

Once a user has access, they can configure their own displays for partner and item maintenance, by selecting Admin / User Defaults. This can be changed as frequently as you want - every time you look at something, you can configure the display to only include what you want to see. Instead of having to scroll down and search.

'Columns to Display in the List' defines what you will see when you see the list of items or partners. 'Blocks to Display for Detail' defines what you will see when you select an item. 'Miscellaneous Item Options' defines how much of the date sensitive data (from extensions) you will see. Note that this is effective for display only; in update you will only see current. This is because some items have so many records that the page becomes too long for the browser to handle. You can change 'Blocks to Display for Detail' to include less so that the page is smaller. If you create a new record by copying an item with a lot of records, you will have a problem. When you do this, all blocks are shown; no matter how you have your defaults set up.

Websmart-3.jpg

Websmart-4.jpg

Add New Authority or Default

DataBase File

This information is all in file INUSERP (Intranet User/Item defaults). This file has 299 flags; 141 of which are currently being used by the two programs above (Change User Authorities, and Change Web User). The fields are named INFLAG001 to INFLAG299. As these flags are assigned a use, it is documented in the DDS source. (The use of all these flags has to be documented somewhere; and I figure this is the obvious place.) Do NOT compile this source – otherwise, every InfoNet program would have to be recompiled!

To assign a new flag, and to keep track of what each does, go into the DDS of this file.

Key in WRKOBJPDM WEBPRDP and press enter.

Position to Q, position to type *FILE, and press enter.

Option 12 on QDDSSRC, and press enter.

Position to INUSERP, and press enter.

Option 2 on INUSERP, and press enter.

Find the next available, unused flag by paging down until you see the comment 'UNUSED FLAGS'.

Move it to the applicable section ('Flags Controlling List of Items', 'Flags Controlling Display of Item Details', 'Flags Controlling List of Partners', 'Flags Controlling Display of Partner Details', or 'Flags Controlling Authorities').

Press F13 (upper shift - F1), and change 'Uppercase input only' to 'N' for no. Press enter.

Change the text of the flag to describe its new use.

Press F3 and enter to save the changes. Remember - do NOT compile.

Update User Authorities Program (IN_ADMIN11)

Look at the current version of the program to determine the logical place to put the new option.

Update User Defaults Program (IN_ADMIN01)

Look at the current version of the program to determine the logical place to put the new option.

Add Authority Checking to InfoNet Program

This function must be in every Infonet program (and the Web Orders version must be in every Web Orders program). Besides checking authorities, it also makes sure that an authorized user has logged on. This makes it impossible for someone to circumvent logging on by simply keying the program name directly into the url.

Change the field name (INFLAG140) to match the newly assigned flag, and the authority error message (auterr) to match its use.

// Authenticate user and get user and store information from smurf (external DS WSUSERP)
func checkuser()
{	
    // first, check for a valid smurf ID, if none redirect to login
    rtncode = isvalidsmurf();
    if(rtncode <>  "0")  // smurf is not valid redirect to home page
    {
       redirect("in_login.pgm");
       exit;
    }
    // smurf ID is set, retrieve user id
    userID = getsmurf("internal_userid");

    if (userid == "")
    { 
       redirect("in_login.pgm");
       exit;
    }	
    // get user's authorities and item defaults
    getrcd(INUSERP, "*DFTKEY");
    if (INFLAG140 <> "Y") 
    {
       redirect("in_home.pgm?auterr=You are not authorized to Analyser");
       exit;	
    }
}