Skip to content
Snippets Groups Projects
Verified Commit ba35f090 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Merge branch 'develop'

parents cbd97eb5 5ba88147
No related branches found
Tags v2.3.0
5 merge requests!245Integrate data upload cloud,!235Integrate data upload cloud,!224Fixing a couple of issues in the redesign,!167Access harrenhal,!72Regular merge of develop
Pipeline #21115 passed
Showing
with 220 additions and 25 deletions
......@@ -45,7 +45,7 @@
if (status == 200) { // The sub-card is internal, and is accessible
window.location.href = internalCardURL;
} else {
UrlExists(internalPortalURL + '/stable/external/' + sub, function(status){
UrlExists(internalPortalURL + '/stable/external/cards/' + sub, function(status){
if (status == 200) { // if sub-card is internal in the external directory and exists
window.location.href = internalPortalURL + '/stable/external/cards/' + sub;
} else {
......@@ -54,7 +54,7 @@
});
}
});
} else {
} else {
// The user did not request specific card, redirect him just to the stable index
var internalPortalIndexURL = internalPortalURL + '/stable';
var internalPortal404URL = internalPortalURL + '/stable/404.html';
......
import os, re
from os import path
def line_prepender(filename, line):
with open(filename, 'r+') as f:
content = f.read()
f.seek(0, 0)
f.write(line.rstrip('\r\n') + '\n' + content)
def remove_header(localroot, root, filename, n=5):
nfirstlines = []
#cwd = os.getcwd()
os.chdir(localroot)
#print("Local root folder:" + os.getcwd())
os.chdir(root)
#print("Local folder:" + os.getcwd())
# count the number of lines
count = 0
headerCheck = False
with open(filename, 'r') as f:
for line in f:
count += 1
# check if the header is actually a header
if (count == 0 or count == n) and line[0:3] == "---":
headerCheck = True
# remove the header
if count > n and headerCheck:
with open(filename) as f, open("tmp"+filename, "w") as out:
for _ in range(n):
nfirstlines.append(next(f))
for line in f:
out.write(line)
os.remove(filename)
os.rename("tmp"+filename, filename)
print(" - Old header removed.")
# change back to the local root
os.chdir(localroot)
#print("exit folder:" + os.getcwd())
# loop through the entire internal tree
localroot = os.getcwd()
# generate the index properly speaking
cardDirs = ["internal", "external"]
sections = []
# determine first the directories
for direct in cardDirs:
if path.isdir(direct):
dirs = os.listdir(direct)
for d in dirs:
if d[0] != ".":
sections.append(d)
sections = list(set(sections))
sections.sort()
index = ""
localIndexArr = [[]] * len(sections)
for folder in cardDirs:
# check if folder exists
if path.isdir(folder):
dirs = os.listdir(folder)
dirs = sorted(dirs)
for d in dirs:
if d[0] != ".":
# set the header of the section
#index += "\n### " + d.replace("-", " ").capitalize() + "\n"
# get the index of the section
indexS = sections.index(d)
#print(indexS)
if len(localIndexArr[indexS]) == 0:
localIndexArr[indexS] = ["\n"]
# walk through the folders with all the cards
for root, dirs, files in os.walk(folder+"/"+d):
for file in files:
if file.endswith(".md"):
fileName = os.path.join(root, file)
# ignore subsections (.md files that start with _)
if file[0] != "_":
print(" > Generating header for: " + fileName)
# remove the previous header
remove_header(localroot, root, file, 8)
# generate a permalink
permalink = "/" + root + "/"
# generate the shortcut
shortcut = re.sub(folder, '', root)
# remove the first /
shortcut = shortcut[1:]
# replace the / with a :
shortcut = re.sub('/', ':', shortcut)
# define the header for each card
header = "---\n"
header += "layout: page\n"
header += "permalink: " + permalink + "\n"
header += "shortcut: " + shortcut + "\n"
header += "redirect_from:\n"
header += " - /cards/" + shortcut + "\n"
header += " - /internal/cards/" + shortcut + "\n"
header += "---"
# add the header properly speaking
line_prepender(fileName, header)
# open file and get the title after the header
count = 0
title = ""
bp = 9
with open(fileName, 'r') as f:
for line in f:
count += 1
if count == bp:
if len(line) > 2:
title = line
break
else:
bp += 1
# remove first and last chars
title = title.rstrip("\n\r")
title = title[2:]
#index += " * [" + title + "](./" + root + "/" + "\n"
localIndexArr[indexS].append("* [" + title + "](./" + root + "/" + ")\n")
# output
print(" + New header added.")
print("-----------------------")
# join all subcategories to the index
localIndexArr[indexS].sort()
print(localIndexArr)
# determine the index
k = 0
for s in sections:
index += "\n### " + s.replace("-", " ").capitalize() + "\n"
index += ''.join(localIndexArr[k])
k += 1
# output the index
#print(index)
# Read in the file
indexFile = "index.md"
filedata = ""
with open(indexFile, 'r') as file :
for line in file:
filedata += line
# stop reading once the index place holder has been reached
if re.search("<!-- index -->", line):
filedata += "[[ index ]]"
break
# Replace the target string
filedata = filedata.replace('[[ index ]]', index)
# Write the file out again
with open(indexFile, 'w') as file:
file.write(filedata)
print("\n > New index generated and saved in " + indexFile)
\ No newline at end of file
......@@ -22,7 +22,7 @@ gem 'jekyll-theme-lcsb-default', '~> 0.3.2'
group :jekyll_plugins do
gem "jekyll-paginate-v2",
"~> 3",
:git => "https://github.com/sverrirs/jekyll-paginate-v2.git"
:git => "https://github.com/LCSB-BioCore/jekyll-paginate-v2.git"
gem "jekyll-feed",
"~> 0.6"
......
......@@ -25,7 +25,7 @@ url: "https://r3.pages.uni.lu" # the base hostname & protocol for your site, e.
# Banner settings
banner: howto-card # When you have custom images, change this setting's value to the name of the folder containing them
logo: small # Change to "big" (without quotas) in case of having broad logo
date: "2019"
date: "2020"
# Social media icon settings
twitter_username: uni_lu
......
---
layout: page
permalink: /external/lums-passwords/
shortcut: passwords:lums
permalink: /external/access/lums-passwords/
shortcut: access:lums-passwords
redirect_from:
- /cards/passwords:lums
- /external/cards/passwords:lums
- /cards/access:lums-passwords
- /internal/cards/access:lums-passwords
---
# LUMS account
In addition to the standard university account, LCSB researchers and external collaborators are provided with the LUMS (LCSB User Management System) account.
This serves for internal authentication for resources provided by the LCSB, e.g. LCSB hosted [GitLab](https://git-r3lab.uni.lu), LCSB [OwnCloud](https://owncloud.lcsb.uni.lu) storage or access to virtual machines.
......@@ -20,10 +20,10 @@ This serves for internal authentication for resources provided by the LCSB, e.g.
3. Create a ticket requesting a LUMS account:
* Choose **LCSB** ticket service:<br/>
<img src="../../external/img/lums_ticket-main.png" height="300px"><br/>
<img src="img/lums_ticket-main.png" height="300px"><br/>
* Navigate to **"BioCore: Application Services"** and choose **"[Request for] a new LUMS account**:<br/>
<img src="../../external/img/lums_ticket-request.png" height="300px"><br/>
<img src="img/lums_ticket-request.png" height="300px"><br/>
* If you know already to which services you need access, please specify it in the ticket.
......@@ -33,11 +33,11 @@ In case you are not a member of the university, please ask your collaborator at
The password you will receive from the system administrators is temporary and **it will expire after one month**, so you have to reset it as soon as possible. It is usually sent as a link to [PrivateBin](https://howto.lcsb.uni.lu/?passwords). **This link is valid for one week and is deleted after you see it once**, thus you need to keep it open until you have followed these steps to reset your password:
1. Go to [lums.uni.lu](https://lums.uni.lu) and login with your LUMS username and the temporary password you received.<br>**NOTE:** If you experience any issues at this step, try to use *Chrome* browser for this procedure.<br/><img src="../../external/img/lums_login.png" height="200px"><br/>
1. Go to [lums.uni.lu](https://lums.uni.lu) and login with your LUMS username and the temporary password you received.<br>**NOTE:** If you experience any issues at this step, try to use *Chrome* browser for this procedure.<br/><img src="img/lums_login.png" height="200px"><br/>
Should the login look different from this, e.g. like a pop-up, click on **x** or **Cancel** to close it.
2. You will be prompted to reset your password:<br/>
<img src="../../external/img/lums_first-reset-password.png" height="300px"><br/>
<img src="img/lums_first-reset-password.png" height="300px"><br/>
3. Enter your temporary password into the field **"Current Password"**.
4. Leave the **"OTP"** field blank.
5. Enter a new password of your choice in the field **"New Password"** and repeat the same password in the field **"Verify Password"**. This is the actual password you need to use from now on, so make sure to remember it.
......@@ -48,10 +48,10 @@ It is a good practice to use a password manager which will not only help you to
## Changing password for LUMS accounts
If you want to change your password for the LUMS account, you can:
1. Go to [lums.uni.lu](https://lums.uni.lu) and login with your LUMS credentials:
<br/><img src="../../external/img/lums_login.png" height="200px">
<br/><img src="img/lums_login.png" height="200px">
2. In the top-right corner click on your name and select **Change password**:
<br/><img src="../../external/img/lums_home-settings.png" height="300px">
<br/><img src="img/lums_home-settings.png" height="300px">
3. Enter your current password and your new password:
<br/><img src="../../external/img/lums_reset-password.png" height="300px">
<br/><img src="img/lums_reset-password.png" height="300px">
---
layout: page
permalink: /external/passwords/
shortcut: passwords
permalink: /external/access/passwords/
shortcut: access:passwords
redirect_from:
- /cards/passwords
- /external/cards/passwords
- /cards/access:passwords
- /internal/cards/access:passwords
---
# Managing your passwords
There are several tools that can be used for password management. Some provide limited (basic) features for free, some require a fee. Below are some password management tools that can be used:
......@@ -36,7 +36,7 @@ When sending passwords to collaborators, it is not advised to use e-mail or inst
### Sending a password
1. 1. Go to [Privatebin @ LCSB](https://privatebin.lcsb.uni.lu/) and type the password you want to share into the Editor tab. You will be asked to enter your LUMS credentials when you click on "Send"<br/>
<img src="../../external/img/privatebin-editor.png">
<img src="img/privatebin-editor.png">
1. Set expiry period
- For the highest safety measures, sender can allow password link to be used only once so it expires upon first access. This feature can be set by checking **Burn after reading** checkbox.
......@@ -44,16 +44,24 @@ When sending passwords to collaborators, it is not advised to use e-mail or inst
1. You can also enter a password to protect your password link - this should be **different** from the password you are sharing!
1. Click **Send** in right-top corner
- you should be redirected to a page containing the password and password link
<img src="../../external/img/privatebin-link.png"><br/>
<img src="img/privatebin-link.png"><br/>
1. Share the **link** with your collaborator via your favorite communication channel
### Receiving a password
* You have been provided a link to website where your new password is stored. (This link can be protected by yet another password you might be asked to enter.)
<img src="../../external/img/privatebin-password.png"><br/>
<img src="img/privatebin-password.png"><br/>
* If you see following:
<img src="../../external/img/privatebin-expired.png"><br/>
<img src="img/privatebin-expired.png"><br/>
* You have either entered the wrong/incomplete link - try copy-pasting the link into your browser instead of clicking on it - or
* your password link has already expired. In that case you will have to request a new link.<br/>
**Warning!**: If the password link was set with one access only (**Burn after reading**) and you are sure that you haven't accessed the link so far, you should notify the password sender because there is a chance that your communication was intercepted and someone accessed the link before you.<br/>
**Note**: If the page looks different from the pictures above, try using Google Chrome browser. If the issue persists, please take a screenshot of the page and send it to our [sysadmin](mailto:lcsb-sysadmins@uni.lu) team.
# Tips when resetting University of Luxembourg Active Directory password on a Mac
To reset your UL AD password when using a Mac:
1. Go to <https://owa.uni.lu> and change your password there.
2. **Before** rebooting your Mac, you should change your keychain password to avoid any issues down the road. To do so, run the following command `security set-keychain-password "/Users/YOURHOME/Library/Keychains/login.keychain-db"`
3. If you use FileVault, after the first reboot, first enter your old password, then the new one. Normally, FileVault will sync and update with your new password after you reboot.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment