How to set up an authentication module on Google Cloud with PHP. Step 1: Create your list of admin users Go to https://console.cloud.google.com/iam-admin/iam/project?project=<your_project_name>&authuser=0 and add users and assign roles to them. I used my work Gmail account as an admin user, and my personal Gmail as an ordinary user. Step 2. specify resources for login In your app.yaml file, specify which resources you want to be restricted to authenticated users, and which are admin-only. - url : / script : index . php login : required secure : always # this requires login but is available to all users - url : / admin script : admin / index . php login : admin secure : always # this requires login and is only available to admin users Step 3. Add authentication PHP to your header include This is the code for my normal user pages: <? php use google\appengine\api\users\User ; use google\appengine\api\users\User...
I had a problem where my screen kept freezing while I was using Chrome, and a colleague recommended turning off hardware acceleration in order to stop that happening. It worked, so I thought I would share how to do it.
FontAwesome is a nifty icon set that you can use anywhere that you can edit HTML. For example, you can use it in Moodle to display a symbol. Step 1. Go to edit mode and find the text region you want to edit. Step 2. Click on the first button on the toolbar (to show more buttons) Step 3. Click on the HTML edit mode button <> Step 4. Go to FontAwesome icons and click on the one you want to use If your icon is purely for decorative purposes, use this code: <i class= "fa fa-tree" aria-hidden= "true" ></i> If it has a semantic meaning, use this code: <i class= "fa fa-tree" ></i> To improve web accessibility , FontAwesome recommend using aria-hidden="true" to hide icons used purely for decoration. Step 5. Paste the HTML into the Moodle text box Step 6. Turn off HTML editing (click on the HTML edit mode button <> again) Now you have a tree in your text box! Need to make it bigger? Go back to HTML edit mode...
Comments
Post a Comment