Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Need Help with security

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need Help with security

    I've been scratching my head a couple of days on this one.
    As we're migrating to AlphaFive V11, and keeping from redesigning our database structures, this may be the cause of the problem. Though i can't figure out why its a problem.
    Initially i was like "Oh fantastic, i can create and edit users with these dialogs... no coding yay!"

    So here goes...
    In our current database. There are two tables. [Agent], [Logon].
    [Agent] Stores stuff like Name, Address, Company, Contact Details, etc...
    [Logon] Stores UserName, Password, FK_Agent
    The [Logon] table linked with the [Agent] table 1 to 1, but not all Agents have, let alone need, Logons.
    Agents may require both the removal or addition of a single logon link, depending on whether there is a request to give them their own logon or if their Administrator is taking over their use of our product.
    So far this all works in regard to visibility, security and permissions with dozens of companies, an admin or two for each company, hundreds of agents, and of course website administrator controls.

    What doesn't work is how i'm trying to setup the page.
    Naturally, I have a page for Website Admins setup where [Agent] details can be edited, with search, grid, and detail view parts.

    The SQL is: [Agent] Left Join [Logon] On [Agent].PK_Agent = [Logon].FK_Agent
    The grid displays - [Agent].FirstName,.LastName,.Company,.Logon
    Detail view displays - All fields from [Agent] to be edited (this updates/adds new just fine)

    However on the grid part I have control links (with conditional visibility) to edit/create logons, which open a popup to edit/create new user from dialogs (Create from the provided templates)
    I've tried both Open Dialog, and Edit existing row as actions for the onclick event of the links - Populating the controls on primarykey [Logon].UserName from the grid for dialog, doesn't seem to be an option for Edit existing row for this :/
    On the dialogs: Binding only UserName and Password controls to the corresponding fields in [Logon]. Set to updateable in the control properties
    Using UserName as primary key for the dialog as suggested.

    Now i could use PK_Logon as the ulink, which i did during evaluation of the product, and keep UserName out of the PrimaryKey, however, with the upcomming move to IIS, i'm going to avoid doing that.

    The popups display correctly for the Grid Row (an Agent) that i click the edit logons link for.
    This all works except for displaying a selected UserRole on Logins that already have their Security Group Set.
    Tried everything from passing in and using session variables to other variable types to display the select value using the selected value property, to no avail. It just complains that variables cannot be found. So i'm stumped there.


    What main problem i'm getting editing the record is "UserName must be unique" when i save. I'm like "what the heck? i'm updating, not inserting", I didn't even edit that field with only edited fields update set to true. But i would like the ability to edit the UserName.

    So i can't even simply update the Logon table from these dialogs upon removing the relevant code in the events.
    I'm close to just building my own HTML form that pops-up and populates along the UserName session variables, with own A5 scripts called on submit to insert/update table records and the Alpha web security. At this stage it just seems a heck of alot easier and makes simpler sense in my head.

    Hope this is making sense. This is a terribly long explanation, but i also hope someone may have some suggestions.

    The tutorial videos D_SF_1 to D_SF_5 have also been no help, there the UserRoles selected value appears to have automatically worked. Also, according to the videos, Using the UserName as PrimaryKey works just fine.
    I also get an error about needing to enter confirm password, when on the videos he saves without even filling that field. I want some validation, but only on those that are changed... i assumed that checkbox would have worked in that instance.

    I've tried using different variable types that i've passed over for the LoadUser script in the OnDialogInitialize event to see if the issue lay there, but that didn't affect the errors i was getting.

    I'm definately doing something wrong, been stuffing around with this too long that i feel i'm totally missing something right in front of me.

    arghh help!

    Might be that i just need to use a Logon only grid and Edit Current Record popup on a seperate page, though I cannot see why. And would like to reduce the amount of screens needed for relational data where i possibly can. (which so far, has been the beauty of Alpha Five and its Security Framework with very little hand coding)
    Last edited by dparker; 02-12-2012, 10:20 PM. Reason: problem solved

    #2
    Re: Need Help with security

    I'm still using v10 security (even w. v11), so what do I know? But I find your explanation terribly confusing. I have no idea what you are saying - except something isn't working for you. Sorry.
    Peter
    AlphaBase Solutions, LLC

    [email protected]
    https://www.alphabasesolutions.com


    Comment


      #3
      Re: Need Help with security

      Might be that i just need to use a Logon only grid and Edit Current Record popup on a seperate page
      That is the best way to do it.
      Regards
      Keith Hubert
      Alpha Guild Member
      London.
      KHDB Management Systems
      Skype = keith.hubert


      For your day-to-day Needs, you Need an Alpha Database!

      Comment


        #4
        Re: Need Help with security

        Originally posted by Peter.Greulich View Post
        I'm still using v10 security (even w. v11), so what do I know? But I find your explanation terribly confusing. I have no idea what you are saying - except something isn't working for you. Sorry.
        Yeah sorry theres a lot to cover, cos it seems a lot is going wrong,
        and i was explaining exactly the configuration of my database, select statements, what each component had, and what did work (which everything worked... and i mean everything was tested... except the popup dialog refused to behave)
        Sorry i don't know how i could be more concise, there is a lot going on on that page and its components.

        (Excuse me if the property names i'm giving are wrong, i'm at a different computer)

        Basically first thing i need a solution to is why I'm getting validation errors on the UserName/UserID control during update of the record. (error message just states its not unique)
        It seems to want to insert instead of update, and maybe because the grid thats calling it is confusing the dialog.
        Validation on edited fields only is ticked for the Edit Users dialog (created via template supplied with Alpha Five V11)... so it should not be validating that control anyway! So i'm lost there.

        If i can find a solution to that, then i can, at the very least, update my Login table in my database.
        (then run my own script to update the security from the relevant record if i decide to)

        Comment


          #5
          Re: Need Help with security

          Ok I have it solved now.

          Turns out opening the EditUser dialog with Edit Existing record only wanted to work if i used the Logon Table as the first table called in the Select Statement on the grid.

          I started with
          Code:
          "SELECT * FROM Agent 
          Left Outer Join Logon On Logon.FK_Agent = Agent.PK_Agent
          Left Join Company On Company.PK_Agent = Agent.FK_Company"
          Which did not correctly open the dialog

          Which I changed to:
          Code:
          "SELECT * FROM Logon
          RIGHT OUTER JOIN (Agent
               LEFT OUTER JOIN Company  ON  Agent.FK_Company = Company.PK_Company )
          ON  Logon.FK_Agent = Agent.PK_Agent "
          This was so i could display all agent records regardless of whether they had security assignments or not
          Which does work.
          Never had a use for a right outer join until now!!

          The great thing about it is how it also functions,
          e.g If an Agent has a logon, the link will open the EditUser dialog.
          Saving it will edit the alpha security for the user and update the Logon table

          But as a bonus, without me having to do anything extra. (I assume this is built into the edit user dialog template)
          Clicking the same Link on a Agents record (whom does not have a Logon created) will still open the dialog (fields all blank).
          This time it allows me to Create a New User, as well as Insert the fields i need into their respective tables upon filling in all the fields and saving.

          I did have to sacrifice the Detail view for this functionality,
          but that was easily remedied by
          1. creating another link to open another popup to edit just the Agents Details and nothing else
          2. creating an action button on the toolbar to open yet another pop-up to enter a new Agent.

          Therefore I can create an Agent Record, and add security later if i want to, all from the same page.
          Also, one cannot create a logon without an agent record first (which is how our old system, which we're migrating from, worked).
          This is works well for our filters as much as control visibility throughout the entire site.

          Exactly what i wanted, yay!!!

          Comment

          Working...
          X