Home > Default > How can i allow a set of user to access to an application

How can i allow a set of user to access to an application

October 11Hits:0
Advertisement
At the moment i have an application that only i can login as the adminstator and i want to be able to let a group of students run the application only (no editing of the application).
I then have a form that loads straight after the login that should show the details of the student that has just logged in.
I already have a students table so is it just a case of adding a password field to the table and pointing the login screen to check this table? If so how can i then set their access to read only?

Answers

This is what I did... it is quick and dirty!
1 exported the app "Project"
2 imported the app "project" and renamed it "project2". Doing this means that I won't cause any damage to his current application
3 examined authentication- currently set to Application Express. Application Express requires that the user and passwords match account created in the admin section of application express.
4 We're after a scheme that authorises based on a table of users in the application workspace schema. The authentication scheme just needs to know the name of a function which has a standard signiture such as fn_auth(p_username varchar2, p_password varchar2) return boolean;
In the SQL Workshop I looked at the "user" table to be used and noticed that it does not contain a loginname column so for this example based this on a case insensitive first name and last name concatenation (with a space in the middle).
Now we need to add a simple authenticate function...
create or replace fn_auth (p_username varchar2, p_password varchar2) return boolean is
begin
for x in(select 1 from student where upper(trim(first_name' 'family_name))=upper(p_username) and upper(password)=p_password) loop
return true;
end loop;
return false;
end;
5 And finally modify the app to use this new function. Add a new scheme and in the Login Processing section of the ahthentication scheme modify the function to
return fn_auth
6 As an aside, I also added a report of user names and their passwords which is shown on page 101 if the user is running in debug mode. Obviously, this would need to be stripped out when the app was released to production. This will not show if the URL is navigated to and the user is not logged in as an APEX developer by using a condition based on a funtion body and the following to determine whether the app is being run for a user or for a developer:
IF APEX_Application.g_edit_cookie_session_id IS NOT NULL THEN return true;
ELSE
return false;
END IF;

Read other 15 answers

Tags:

Related Articles

  • Problem with threads running javawOctober 11

    Hi, Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in

  • Problem with threads and simulation: please helpOctober 11

    please help me figure this out.. i have something like this: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class DrawShapes extends JApplet{      private JButton choices[];      private String names[]={"line", "sq

  • Problem with threads communicationOctober 11

    Hi All I have a multithreaded application in which I have 3 threads running including main thread. One of the thread (Thread1) spawned by main thread is performing the business logic required. The other one (Thread 2) is just to send the periodic sig

  • Problem with threads hangingOctober 11

    We have a problem where our application stops responding after a few days of usage. Things will for fine for a day or two, and then pretty quickly threads will start getting hung up, usually in places where they are allocating memory We are running W

  • Problem with threads in my swing applicationOctober 11

    Hi, I have some problem in running my swing app. Thre problem is related to threads. What i am developing, is a gui framework where i can add different pluggable components to the framework. The framework is working fine, but when i press the close a

  • Problem with threads and/or memoryOctober 11

    I'm developing an application where there are 3 threads. One of them sends a request to the other, and if the 2nd can't answer it, it sends it to the 3rd (similar to CPU -> CACHE -> MEMORY). When i run the program with 1000-10.000 requests, no probl

  • Default Encrypted  PasswordOctober 11

    Dear All, i want to insert encrypted Password of 'password' string into table user_dtl column PASSWORD . How can i insert Encripted password into table. ThanksHi Vedant, See the CUSTOM_HASH function that is installed with sample application in the AP

  • New DVR Issues (First Run, Channel Switching, etc.)October 11

    I've spent the last 30 minutes trying to find answers through the search with no luck, so sorry if I missed something. I recently switched to FIOS from RCN cable in New York.  I've gone through trying to setup my DVR and am running into issues and wa

  • Delete File From Mounted VolumeOctober 11

    Hey, I am trying to delete the "Calendar Cache" files on both my laptop PowerBook G4 and the Mac Pro Quad that I sync my calendars with. I am using ChronoSync and the individual calendars sync fine, but there is a little house keeping needed wit

  • It hangs when I login DBOctober 11

    It has no response when I try to login database. I cancel the login since I don't have any choices SQL> connect apps/apps ^CERROR: ORA-00604: error occurred at recursive SQL level 1 ORA-01013: user requested cancel of current operation But it is ok i

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.967 s.