Jump to content
Sign in to follow this  
opalepatrick

Time Punch Portal

Recommended Posts

Hi there, just looking for ideas for an IP restricted login page for employees on site? Where to start? Is the IP restricted idea best? Just basically want to make sure employees are in the building when they sign in. Thanks for any help.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By EyeDentify
      Hello Fellow PW fans.

      Tought i share a simple but usefull way of utilizing the $log system in PW to do simple loging on what IP visit the site and also the HOST.

      Its not fancy, and its very basic, see it as a boiler plate. You can get all kinds of fancy with it.

      Remember that the $log system automaticly records the URL from where it was called so we don´t need to supply that to our Entry.

      I just wanted a simple entry with IP and HOST, the date is also recorded with the entry automaticly.

      The beauty is that i can watch the logs from the ADMIN page almost in realtime.

      I am using the "markup regions" output method so i put the code in my _main.php file.
      You could just put it wherever like to be included with every page load in your site.

      I hardcoded my logfile to be named ip_log_site but you can use what you feel is better.
      Also made sure the loging do not happen if your logged in as admin (Super user).
      See this PW Doc for more info:
      https://processwire.com/api/ref/wire-log/save/
       
      <?PHP function logIP($session, $log) { /* get IP info */ $ip_adress = $session->getIP(); $host_address = gethostbyaddr($ip_adress); /* log IP adress info NOTE: 'ip_log_site' is a hardcoded name of the logfile, change for your preference. */ $log->save("ip_log_site", "IP: {$ip_adress}, Host: {$host_address}"); } /* if Super User (Admin) do not log */ if(!$user->isSuperuser()) { logIP($session, $log); } ?> Hope anyone have use for it.
       
      /EyeDentify
    • By celfred
      Hello,
      I'm facing an issue trying to restrict access to a field so front-end edition is possible in an easy manner for the user. Let me explain :
      I have a field 'group' which is a Page list of group names. I want the user to be able to front-end edit a 'player' page in which this group field appears. I'd like the user to have a list of groups limited to his or her own groups (so he or she doesn't see all groups created by other users). In the back-end, I use this selector string : template=group, created_users_id=[user], sort=title This works great ! BUT here's my issue :
      If I back-end edit a 'player' page as 'Admin', the 'group' is empty (since admin is not the created-users-id and the group field is then empty... In other words, I must choose between all groups shown to all users (which may be scary for a user having only 2 or 3 groups whena list of 60 shows up) OR having a correct list for the front-end user, but empty for the back-end 'admin'.
      Can anyone think of another way I could get the expected result ? I have a feeling the simplest way would be to have a "Ignore for superusers" checkbox next to the 'selector string'. 
      Thanks !
    • By Mobiletrooper
      Hey Ryan, hey friends,
      we, Mobile Trooper a digital agency based in Germany, use ProcessWire for an Enterprise-grade Intranet publishing portal which is under heavy development for over 3 years now. Over the years not only the user base grew but also the platform in general. We introduced lots and lots of features thanks to ProcessWire's absurd flexibility. We came along many CMS (or CMFs for that matter) that don't even come close to ProcessWire. Closest we came across was Locomotive (Rails-based) and Pimcore (PHP based).
      So this is not your typical ProcessWire installation in terms of size.
      Currently we count:
      140 Templates (Some have 1 page, some have >6000 pages)
      313 Fields
      ~ 15k Users (For an intranet portal? That's heavy.)
      ~ 195 431 Pages (At least that's the current AUTOINCREMENT)
       
      I think we came to a point where ProcessWire isn't as scalable anymore as it used to be. Our latest research measured over 20 seconds of load time (the time PHP spent scambling the HTML together). That's unacceptable unfortunately. We've implemented common performance strategies like:
      We're running on fat machines (DB server has 32 gigs RAM, Prod Web server has 32gigs as well. Both are running on quadcores (xeons) hosted by Azure.
      We have load balancing in place, but still, a single server needs up to 20 sec to respond to a single request averaging at around about 12 sec.
      In our research we came across pages that sent over 1000 SQL queries with lots of JOINs. This is obviously needed because of PWs architecture (a field a table) but does this slow mySQL down much? For the start page we need to get somewhere around 60-80 pages, each page needs to be queried for ~12 fields to be displayed correctly, is this too much? There are many different fields involved like multiple Page-fields which hold tags, categories etc.
      We installed Profiler Pro but it does not seem to show us the real bottleneck, it just says that everything is kinda slow and sums up to the grand total we mentioned above.
      ProCache does not help us because every user is seeing something different, so we can cache some fragments but they usually measure at around 10ms. We can't spend time optimising if we can't expect an affordable benefit. Therefore we opted against ProCache and used our own module which generates these cache fragments lazily. 
      That speeds up the whole page rendering to ~7 sec, this is acceptable compared to 20sec but still ridiculously long.
      Our page consists of mainly dynamic parts changing every 2-5 minutes. It's different across multiple users based on their location, language and other preferences.
      We also have about 120 people working on the processwire backend the whole day concurrently.
       
      What do you guys think?
      Here are my questions, hopefully we can collect these in a wiki or something because I'm sure more and more people will hit that break sooner than they hoped they would:
       
      - Should we opt for optimising the database? Since >2k per request is a lot even for a mysql server, webserver cpu is basically idling at that time.
      - Do you think at this point it makes sense to use ProcessWire as a simple REST API?
      - In your experience, what fieldtypes are expensive? Page? RepeaterMatrix?
      - Ryan, what do you consider as the primary bottleneck of processwire?
      - Is the amount of fields too much? Would it be better if we would try to reuse fields as much as possible?
      - Is there an option to hook onto ProcessWires SQL builder? So we can write custom SQL for some selectors?
       
      Thanks and lots of wishes,
      Pascal from Mobile Trooper
       
       
    • By prestoav
      Posting in the hope this helps someone out of a hole!
      Having built 20+ sites on PW in the last couple of years (and loving it...) I came across a really odd situation recently.  The client's IT company and I 've been battling for a couple of weeks and today, finally, we have an answer!
      The site is built and temporarily housed on a shared hosting account we have for development. All tested well here so Access was granted to the client to start adding content. 
      The next day I get a call from the client to say the admin side of the site is logging them out every 30-40 seconds and they have to log back in again each time to continue. I tested again from our office with their login but all worked as expected. Other browsers, PCs etc. were all tried by the client but the problem persisted.  So, I get in my car and drive to the client's site. Sure enough, I see the issue on one of their iMacs. So I open up my MBP, connect to their network, log in as them and the problem is there. So, next, I came off of their network and onto my tethered iPhone on 4G. Bingo! The problem goes away.
      So it's their network that's the issue.
      Their IT company were called and, with us helping them wherever possible, they worked on it for 2 weeks to find the problem. I captured the port numbers in use by PW admin (60992, 60993, 61000, 61001, 61002, 61003 by the way) and the IT company opened those ports on the router but still, the problem remained :-(
      And then the breakthrough...
      They have two VDSL lines into the building that feed their router through a load balancer. It seems that their setup meant that responses to outbound traffic did not necessarily come back in via the same line. Processwire admin does not like this!
      So, the IT company put in a rule to direct all traffic from the IP of the shared hosting through the same route in and out of the building and BOOM! it all works as expected. Phew!
      All's well that end's well but it certainly put us through the wringer tracking it down. Actually, I think it's pretty cool that PW does this. A good extra security measure. Several other CMSs (no names...) worked just fine with this scenario but not PW.
      Anyway, happy client, happy me. Hopefully, this story helps someone else here too.
       
    • By benbyf
      Is there any built in way of disregarding the time on output in a datetime field is the time was orginially set?
      Ive gone from using the date only to using both date and time, but any timeless pages default to outputing 12:00am which looks odd having many pages listed in this way.
      Any thoughts would be welcome
×
×
  • Create New...