Author Topic: How to allow/disallow UPDATE mode using @ID  (Read 2044 times)

0 Members and 2 Guests are viewing this topic.

nchalkias

  • Member
  • Posts: 4
    • View Profile
How to allow/disallow UPDATE mode using @ID
« on: October 18, 2006, 08:48:29 AM »
I was wondering if there is a way to go into UPDATE mode using the @keyU in INPUT processing. I plan on using @ID to allow specific users to do UPDATES and others not.
Any help would be appreciated.

Thanks

Nick

ernieb

  • Member
  • Posts: 52
    • View Profile
    • brightonbunch.com
Re: How to allow/disallow UPDATE mode using @ID
« Reply #1 on: October 18, 2006, 09:11:00 AM »
Quote from: "nchalkias"
I was wondering if there is a way to go into UPDATE mode using the @keyU in INPUT processing. I plan on using @ID to allow specific users to do UPDATES and others not.
Any help would be appreciated.

Thanks

Nick


Use @update label. I'm guessing you'll need a 'users' table to lookup to so that you can 'set' permissions from.
Never increase, beyond what is necessary, the number of entities required to explain anything.

kenbrody

  • Administrator
  • Posts: 82
    • View Profile
How to allow/disallow UPDATE mode using @ID
« Reply #2 on: October 18, 2006, 09:32:44 AM »
For example:
Code: [Select]
@update  If: @id ne "root"
       Then: errorbox "Sorry, only 'root' can use update." ; end
         If:
       Then: screen ; end


Obviously, your tests would probably be more involved.  But the idea is that, if the user isn't allowed, display the error and END.  Otherwise, continue through with SCREEN and any other processing.
Kenneth Brody
aka "Mr. filePro"  :-)

nchalkias

  • Member
  • Posts: 4
    • View Profile
How to allow/disallow UPDATE mode using @ID
« Reply #3 on: October 18, 2006, 10:07:31 AM »
That worked. I have a users table already.
Thanks.