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

Logged In Users group?

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

    Logged In Users group?

    Is it correct that there is no Logged In Users group per se, and to achieve that, I should create a Logged In Users group and always ensure that All users are inside that group? Thanks.
    Frank R

    #2
    Re: Logged In Users group?

    Alpha has a full featured security system called Security Framework. Users must belong to groups in order to use security effectively.
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Re: Logged In Users group?

      I don't think you're following my question. I understand the basics of the Security Framework. My question is: does it have the notion of - a Logged In User, without having to specify a particular group or groups for access to a page? If I set a page to requiring a log in, I am asked to specify which groups are allowed to access the page. What if I just want Anyone in my 1000 member roster to access the page, as long as they log in? Does the framework have a notion of such an attribute, or do I only achieve it by actually creating an All Users group, ensuring that Every individual in my roster belongs to that group, and setting the page to that group?
      Frank R

      Comment


        #4
        Re: Logged In Users group?

        OK, I see what you are asking. You'd have to fake it and go outside of the 'standard' security framework, and it may be more work in the long run compared to adding all to a 'default' security group. (I add everyone to a groups named Users, then differentiate depending on their authority).

        Before we had Security Framework, all pages were accessible to everyone. But we added code to the top of each page, that 'tested' their permissions, and denyed access if appropriate. Testing at the first level just meant, are you logged in or not. Then are you allowed to access this particluar page. The Users table stored permissions indicating if the person was allowed even to log in, and then other fields to indicate what they could access. (It was a pain on a complicated system.)

        Security Framework will force you to select at least one security group when you indicate a page requires login.

        So in your case, you would have to desigate all common pages as Always Allow in security, then add your code to selectively restrict. The user would technically open the page, but get redirected immediately if they did not have permission.

        If you want ALL of your pages to have this feature, and you don't need anything else from Secuirity Framework, you can leave Security entirely off and 'write you own' security using this model.

        If you want to go there, I can dig up some of that page code (around version 6 and 7).
        Steve Wood
        See my profile on IADN

        Comment


          #5
          Re: Logged In Users group?

          Steve - thanks.

          I think my best option at this point is:

          > add everyone to a group named Users, then differentiate depending on their authority
          Frank R

          Comment


            #6
            Re: Logged In Users group?

            Maybe I'll just add this here instead of starting a new thread for this question:

            First of all, before I say more, let me say that Alpha's security model is better than others I have used. It's excellent.

            What I have to often do, though, is not just allow only certain groups to access a page, but also, dynamically allow certain groups, based on the contents of data on the form. i.e. one of the pulldowns of a form indicates the data is for Engineering, therefore only Engineering can update a signature on the form. If that same pulldown specified Manufacturing, only Manufacturing can update the form.

            Are there XBasic functions for things like - membership in a group?

            i.e.
            if MemberOfGroup("Engineering") = .T. then
            ...............allow for update
            end if
            Frank R

            Comment


              #7
              Re: Logged In Users group?

              I can see doing this a couple of different ways. First off, yes you can determine what group(s) the person belongs to. I do it with this function:

              session.loggedingrp = a5ws_get_user_assignments(session.__protected__ulink,request)

              session.loggedingrp will contain a crlf delimited list of their groups. The first parameter is their ULINK, you can also use their login username, called the userid in security.

              So maybe loggedingrp contains:
              Users
              Managers

              If you place that code anywhere after they are logged in, the session.loggedingrp will contain those values.

              Armed with this, you can prohibit in a few ways.

              - you could include code in the Validate Event of a Dialog if you were taking data-entry in a Dialog. Compare the contents of loggedingrp with what you want to allow.
              - you could put code on the A5W page where you took data-entry to actually eliminate the signature field alltogether.

              ------------
              Here is some related code I happend to write earlier today. It takes a list of designated security groups from a table. It compares them to the logged in user's group(s) and then it sets a filter named session.contractfilter to ALL (e.g. filter=null) or some filtered list.

              The session.contractfilter becomes a dropdown list in a Dialog. So I am limiting the values in that list if it has a filter, or for specific security groups, they see ALL values.

              --------------
              Code:
              dim session.contractlist as c = ""
              dim membergrp as c = ""
              dim listallcontracts as l = .f.
              loggedingrp  = a5ws_get_user_assignments(session.__protected__ulink,request)
              allowedgrp = alltrim(lookup("[PathAlias.ADB_Path]\defaults",".t.","listallcontracts"))
              save_to_file(loggedingrp + "|"+allowedgrp,"c:\test2.txt")
              for each foo in loggedingrp
              	if inlist2(foo.value,allowedgrp)
              		listallcontracts = .t.
              	end if
              next 
              if listallcontracts = .t.
              	session.contractlist = table.external_record_content_get("contract_assignment","contractno","","")
              	else
              	session.contractlist = table.external_record_content_get("contract_assignment","contractno","","user_no="+quote(session.__protected__ulink))
              end if
              Steve Wood
              See my profile on IADN

              Comment


                #8
                Re: Logged In Users group?

                Thanks so much. I really appreciate it.

                I have done a ton of reading in the last few days, but one thing I didn't do yet was - scan the function reference. Your post prompted me to do that.

                I've got to spend some time inside that reference.

                Anyway, I also see there:

                Code:
                Result_Flag as L = A5_USERBELONGSTO( Group as C )
                 
                Result_Flag:
                 .T. = the user belongs to the Group or the Group exists.
                 .F. = the user does not belong to the Group or the Group does not exist.
                 
                Group:
                 The name of a user group.
                Frank R

                Comment


                  #9
                  Re: Logged In Users group?

                  When you scan the functions, be sure to note if they are for Desktop and/or Web. The function you cited is Desktop only. ALL of the web related functions start with a5ws_.
                  Steve Wood
                  See my profile on IADN

                  Comment


                    #10
                    Re: Logged In Users group?

                    Ahhh, I didn't notice that yet. Thank you again.

                    Is there a convention for functions that can be used for both Desktop and Web app?
                    Frank R

                    Comment


                      #11
                      Re: Logged In Users group?

                      Originally posted by FrankR View Post
                      Ahhh, I didn't notice that yet. Thank you again.

                      Is there a convention for functions that can be used for both Desktop and Web app?
                      The help file on security and user groups should make clear whether it relates to desktop or web.

                      For everything else, the only thing that you really can't use are commands and functions relating to forms and browsers as well as those starting with ui_

                      Everything else is at least worth trying in my view, I have found most of them to work just fine on the WAS.

                      Comment

                      Working...
                      X