suntrop

Members
  • Content count

    223
  • Joined

  • Last visited

Community Reputation

39 Excellent

1 Follower

About suntrop

  • Rank
    Sr. Member

Profile Information

  • Gender
    Not Telling
  • Location
    Germany, Cologne

Recent Profile Visitors

3,143 profile views
  1. Thanks for your help! No cPanel, a custom made tool. I had installed Tracy Debugger, but couldn't see anything wrong. Maybe I will check the ProDevTools. On monday I will see t get in touch with someone else. Unfortunately there is no monitoring but I do have rights to install software. Had New Relic on my mind, but you link looks like a quite nice list. I am not that familiar with installing apps on the terminal, but I can clone the server and "test ruin" everything No, there is nothing new the last 30 days. It is a rather small business website. Just usual pages like "About", "Team" etc. There is almost nothing special in there. I will check on MySQL! Currently the site works fine. But I increased memory to 4 GB. I find it hard to believe I am using 4 GB for a tiny website
  2. Hi guys Since last night I have trouble with my cloud server. It is a VPS with 2 CPU, 2 GB RAM and just one small website installed (about 30 pages, nothing fancy and less than 50 visitors/day). I am not a server expert, but I would believe these resource should be fine for PW (3.0.42). The hosting company just blames the website script and something uses too much RAM. It worked fine the last six month and I didn't change anything the last 30 days. Is there anything I can do to double check?
  3. I need for an web app files that keep their original names. Like “A new flavour from Häagen-Dazs.pdf”. Why? Because my web app is some kind of file sharing (for a company) and those files need to be re-integrated into their original place. The company uses a DMS that partly relies on file names. If they get back “a-new-flavour-from-hagen-dazs.pdf” it’ll break consistency. I tried but couldn’t get rid of the file name validation. Is it possible to disabled it? I couldn’t find a hook for file uploads. Is it possible to hook into it and change back the original name? ... or instead, save the original name in the file description? So when I download the file I can pass in the original name? Another ugly way would be to just store file paths in a multiplier or just a folder path (but that excludes admin users uploading files within PW) I read a blog post by soma with an interesting solution to store files as a dedicated page. This would come in handy, because I need to manage access on all files anyway. Most files are coming from and front end upload form. But the admins will work on the PW backend and that is quite combersome to create for every file a new page, name it accordingly, upload the file and create a reference. On github I found a workaround by @matjazp but the Dropbox link isn’t working anymore. https://github.com/processwire/processwire-requests/issues/56#issuecomment-263669255
  4. Well, of course. If I know what I am doing 😀 I will go through the code at the weekend. As mentioned on my first post above, there are two challenges. The other is completely different, so I’ll create new thread. Hopefully you guys can help there too
  5. Thanks. I saw this before and thought it was just for the page tree on the back end. I just had a quick look in the code and the hooks and it seems it isn’t intended for front end view permission, is it?
  6. Hey guys thanks for your input! I tested several options and both modules above. The dynamic roles are pretty cool and powerful. I think in my situation I would need hundreds of those roles (because sub groups have their own permissions and there are ~5 to 10 sub groups ). As I understand would need to create for each group and each sub group a custom role and a custom dynamic role to add access for those roles to that group/sub group. The UserGroups looks good as well. But I couldn’t see how to work with it. It says “create few groups, look for access tab on pages and try”. I made two groups, added a couple of users to it. But now what? There is no access tab on the edit page I had a look at Ryan’s Page Edit per User. The code looks quite short and easy. Would it be hard to transfer it from the user to the page itself? I mean, it would be nice if the page (group) has a select field where I just need to add useres who can have view access. I “just” need to hook into the viewable method? And will it work with $page->find()
  7. Hi all. I’m planning a new site/web-app and there are two challenging parts First and probably more difficult is managing access. The site is some kind of file sharing combined with a commenting system. Users can create a comment in their group and upload a file optionally. It is for a company that will share PDF, Excel, etc.. with its clients. The fun part is, there are a lot of groups each with its own access privileges. And even better there need to be sub groups for a subset of users from that group 😀 For example /groups/acme/ /groups/acme/onlyjohnandjane/ /groups/acme/onlyjaneandjim/ /groups/company-b/ /groups/company-c/ /groups/company-c/only-james-jack-jenny/ As you can see each group (aka company) has a top level page where all the group members have access and there need to be sub pages where only some selected members of that group can have access. Currently only some admin users need to have access to all/more than one group. At the moment I think there are about 30 to 50 groups concurrent. Perhaps they will change their mind and groups won’t be deleted but archived and there are +50 groups each year. Groups need to be set up very easily. Because of that I can’t tell them to create a template, add roles etc. And I am afraid the amount of templates will reach an unusable number. So my second idea to create a process module that creates a group with a template and useres isn’t the best idea. I found two related modules from Ryan, but both have their downside. The Page Edit Per User maybe fits in the most. But I don’t know if it works with my sub groups. Those need custom not inherited access. The Custom Page Roles sounds good as well but won’t work with PW’s API like $page->find() my first idea was to use unguessable URLs like /groups/neiUwnd728ns7nei726e384/ and if I carefully restrict all find() etc to those pages ... but that feels wrong Any ideas? What would be a good and safe way to create my pages?
  8. What data? Data in your new/old MySQL database or actual files and folders?
  9. And you are sure it is not cached? 301 are tough to get rid of. Do you know there is a table on the settings tab that lists permissions formthat particlar page?
  10. I too wouldn’t change it nor use it for anything, but I believe guest role is not that important https://github.com/ryancramerdesign/ProcessWire/issues/588#issuecomment-52206316
  11. Hi LAPS I think Lister was designed for back-end use and will check if the user has proper permissions. Haven’t done that before but you can try to create a new role add the page-lister permission and add that role to the guest user. However, what is in your lister what can’t be rendered with PW’s API? Do you need just the table result or the form with all the search fields as well?
  12. Hi. I am not sure if I got what what you want correctly. But have you checked th redirect isn’t cached? Topically browsers chance 301 redirects. Other than that, if a user with two roles assigned and one has view permission and one has not the user itself will have permission to view that page.
  13. // EDIT It works now. There is a conflict with another Pages::saveReady hook, that updates the title, when a particular field is changed. It seems $page->isChanged('fieldname') is true when I create a new page and the field was already set in the source. I'll see how to get a workaround for this.
  14. That is a nice solution! I will definitely try this if I can't get my hook to work … but I really would like to know what the problem is with my code. And when it works, I go and try your solution and compare them I am always happy to see how other people find their way to the same outcome. However, on that custom endpoint I would have to run just the same code and clone the page. Well … I'll test it now
  15. Yes. At the end I need three buttons and each must clone the page to different destinations, with different templates and different code that runs before the page gets saved. If here is just one clone button I can’t distinguish “how” the page needs to be copied.