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

How do you disable a control on Dialog2 based on User Group Security?

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

    How do you disable a control on Dialog2 based on User Group Security?

    (no response under V12 newsgroup, so trying here)

    How do you disable a control (server-side) on a Dialog2 component based on User Group Security? Hiding the control based on security is easy, but what if I just want to disable it?

    Compare Dialog2 to a Grid: The Detail Part of a Grid has two separate Security Group property boxes. So, I can choose between disabling or hiding. I don't see that sort of thing for Dialog2.

    I'm sure it is just something simple I'm overlooking, being that Dialog2 (a.k.a. UX) has a number of features not found in a Grid component and that Dialog2 seems to get the all the new development effort.


    P.S. There is a similar issue in the Search Part of a Grid: A Search Part Control can be hidden, but I cannot figure out how to disable it based on User Security Groups using just the properties builder. I can use a client-side session variable expression. But it would be more convenient if User Security Groups could be used disable the search field from the server's side.

    #2
    Re: How do you disable a control on Dialog2 based on User Group Security?

    Just remember that "disabling" on the clientside is false security - you can re-enable using Firebug, for example. I would go with the session var for now...

    Comment


      #3
      Re: How do you disable a control on Dialog2 based on User Group Security?

      Originally posted by agillbb View Post
      Just remember that "disabling" on the clientside is false security - you can re-enable using Firebug, for example. I would go with the session var for now...
      Right, I was thinking of that too.

      But there must be a way to do it, right?

      Comment


        #4
        Re: How do you disable a control on Dialog2 based on User Group Security?

        Yes - just set a session variable on the serverside (after login, for example) according to your permissions, publish it to the dialog, and use it in the "enable" property like SESSION.MYSECURITYVAR = "admin"

        Comment


          #5
          Re: How do you disable a control on Dialog2 based on User Group Security?

          There's a server-side show/hide expression at the control level, but not server-side enable/disable, so I think your (Andy) method is just using a session variable to initially set Javascript but you could still re-enable it in Firebug. I was a bit ignorant to that piece of thinking until just a couple of weeks ago so I'm very curious to get a solid answer too.

          Using the security settings to show or hide, the control doesn't even get rendered so it can't be manipulated in Firebug. Is there nothing comparable in enable/diasable? Thinking on the fly here, you could have duplicate data with one as a label and one as a textbox that shows up based on security permissions, or you could write your own AfterValidate code so that fields only get updated or inserted if someone's security settings or session variables are what you want them to be, so even if they could enable a field with Firebug, their changes wouldn't make it to the database.

          Comment


            #6
            Re: How do you disable a control on Dialog2 based on User Group Security?

            Call me lazy if you want, but wouldn't it be easier to duplicate the dialog and set the appropriate permissions ?
            Gregg
            https://paiza.io is a great site to test and share sql code

            Comment


              #7
              Re: How do you disable a control on Dialog2 based on User Group Security?

              Originally posted by madtowng View Post
              Call me lazy if you want, but wouldn't it be easier to duplicate the dialog and set the appropriate permissions ?
              Gregg, a few of the data fields in my system can only be updated by people with higher-level privileges. In my case these fields are displayed as Textboxes with a defined dropdown. For just a few fields, I'd rather not duplicate the whole component. I really like using the "Update Settings / Security Group" property in the "Detail part" of a grid. I can place a Textbox with a Dropdown Lookup and Alpha takes care of disabling the dropdown based on group security. The UX cannot do that so easily.

              On a UX, a Textbox with an associated Dropdown does not seem to have a property for disabling the dropdown (on the server-side) - at least I could not get it to work as expected when I tried the "Readonly" and "Disabled" properties under "Textbox Properties." I had thought I could perhaps manipulate those two properties when the UX is initialized.

              My conclusion is that it is easier, and even more flexible, to just define two data controls (one as a read-only control, and the other as an updatable control) when I have fields that need field-level security on a UX. Associating the fields to two different, carefully chosen, Security Group Names (Like: "TABLE_SOMEFIELD_view" and "TABLE_SOMEFIELD_edit") works okay. The System Administrators will have to ensure each person is assigned to no more than one of these Security Groups. And if the user is not supposed to see the field at all they just don't assign either of those groups to the user.

              Comment


                #8
                Re: How do you disable a control on Dialog2 based on User Group Security?

                The 'Security Groups' in a Dialog2 does not seem to work properly, the SQL still tries to reference the argument value but the argument does not eixst in the argument list leading to errors.
                Any way around this?
                Scott Moniz - Computer Programmer/Analyst
                REA Inc.
                http://reainc.net
                (416)-533-3777
                [email protected]

                REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                contact us to discuss options.

                Comment


                  #9
                  Re: How do you disable a control on Dialog2 based on User Group Security?

                  Originally posted by aburningflame View Post
                  The 'Security Groups' in a Dialog2 does not seem to work properly, the SQL still tries to reference the argument value but the argument does not eixst in the argument list leading to errors.
                  Any way around this?
                  Did anyone find a solution to the problem Scott points out above? Has Alpha been notified?
                  Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                  Comment


                    #10
                    Re: How do you disable a control on Dialog2 based on User Group Security?

                    Hey iRadiate - I never was able to find a solution and thankfully that field ended up being okay for employees to use too (not just admins).
                    I am surprised this bug was not found by alpha. Simple/Basic things like this should work. They are a common occurrence. :/ Thanks Alpha.
                    Scott Moniz - Computer Programmer/Analyst
                    REA Inc.
                    http://reainc.net
                    (416)-533-3777
                    [email protected]

                    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                    contact us to discuss options.

                    Comment


                      #11
                      Re: How do you disable a control on Dialog2 based on User Group Security?

                      I have sent a bug report to Alpha on the missing argument issue when group security is applied.
                      Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                      Comment


                        #12
                        Re: How do you disable a control on Dialog2 based on User Group Security?

                        Cool. I usually dont bother with bug reports. Alpha seems to be unresponsive in my own personal opinion.
                        They dont even look at that great ideascale that was created for them BY users - kinda disappointing.
                        http://alphasoftware.ideascale.com/

                        If only they concentrated on stabilizing / improving their existing functionality as opposed to constantly adding new features.
                        My 2 cents. Anyhow - let me know if they ever respond to you and what the outcome is.
                        Scott Moniz - Computer Programmer/Analyst
                        REA Inc.
                        http://reainc.net
                        (416)-533-3777
                        [email protected]

                        REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                        If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                        contact us to discuss options.

                        Comment


                          #13
                          Re: How do you disable a control on Dialog2 based on User Group Security?

                          Stephen,
                          I'm not sure I follow, can you explain more what you are trying to do?

                          -Rich F.

                          Comment


                            #14
                            Re: How do you disable a control on Dialog2 based on User Group Security?

                            Originally posted by RichCPT View Post
                            Stephen,
                            I'm not sure I follow, can you explain more what you are trying to do?

                            -Rich F.
                            "The 'Security Groups' in a Dialog2 does not seem to work properly, the SQL still tries to reference the argument value but the argument does not exist in the argument list leading to errors." - Exact same issue

                            Create a databound dialog
                            Add a field
                            COntrol this field with a security group
                            Login with someone who DOES NOT HAVE ACCESS to that field
                            SQL Error because the SQL statement contains the field name, but the field name isnt added to sql arguments (the field shouldnt be part of the sql)
                            Scott Moniz - Computer Programmer/Analyst
                            REA Inc.
                            http://reainc.net
                            (416)-533-3777
                            [email protected]

                            REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                            If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                            contact us to discuss options.

                            Comment


                              #15
                              Re: How do you disable a control on Dialog2 based on User Group Security?

                              Heard back from Selwyn and he indicates the fix will be in tomorrow's pre-release
                              Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                              Comment

                              Working...
                              X