diff --git a/PyRIGS/urls.py b/PyRIGS/urls.py index 9ef4fa53..646e2dbf 100644 --- a/PyRIGS/urls.py +++ b/PyRIGS/urls.py @@ -2,24 +2,36 @@ from django.urls import path from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns +from django.contrib.auth.decorators import login_required from django.conf import settings +from django.views.decorators.clickjacking import xframe_options_exempt +from django.contrib.auth.views import LoginView from registration.backends.default.views import RegistrationView +from PyRIGS.decorators import permission_required_with_403 import RIGS -from RIGS import regbackend +from RIGS import regbackend, forms, views urlpatterns = [ - # Examples: - # url(r'^$', 'PyRIGS.views.home', name='home'), - # url(r'^blog/', include('blog.urls')), + path('', include('RIGS.urls')), + path('assets/', include('assets.urls')), - url(r'^', include('RIGS.urls')), - url('^assets/', include('assets.urls')), - url('^user/register/$', RegistrationView.as_view(form_class=RIGS.forms.ProfileRegistrationFormUniqueEmail), + path('user/register/', RegistrationView.as_view(form_class=forms.ProfileRegistrationFormUniqueEmail), name="registration_register"), + path('user/login/', LoginView.as_view(authentication_form=forms.CheckApprovedForm), name='login'), + path('user/login/embed/', xframe_options_exempt(views.LoginEmbed.as_view()), name='login_embed'), + # User editing + path('user/', login_required(views.ProfileDetail.as_view()), name='profile_detail'), + path('user//', + permission_required_with_403('RIGS.view_profile')(views.ProfileDetail.as_view()), + name='profile_detail'), + path('user/edit/', login_required(views.ProfileUpdateSelf.as_view()), + name='profile_update_self'), + path('user/reset_api_key', login_required(views.ResetApiKey.as_view(permanent=False)), + name='reset_api_key'), path('user/', include('django.contrib.auth.urls')), path('user/', include('registration.backends.default.urls')), - url(r'^admin/', admin.site.urls), + path('admin/', admin.site.urls), ] if settings.DEBUG: diff --git a/RIGS/static/js/all.js b/RIGS/static/js/all.js new file mode 100644 index 00000000..5761f45e --- /dev/null +++ b/RIGS/static/js/all.js @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.12.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +!function(){"use strict";var c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}var h=(c.navigator||{}).userAgent,z=void 0===h?"":h,v=c,a=l,m=(v.document,!!a.documentElement&&!!a.head&&"function"==typeof a.addEventListener&&a.createElement,~z.indexOf("MSIE")||z.indexOf("Trident/"),function(){try{return!0}catch(c){return!1}}());function s(c,l,h){return l in c?Object.defineProperty(c,l,{value:h,enumerable:!0,configurable:!0,writable:!0}):c[l]=h,c}function e(c){for(var l=1;l2&&void 0!==arguments[2]?arguments[2]:{},v=z.skipHooks,a=void 0!==v&&v,m=Object.keys(h).reduce((function(c,l){var z=h[l];return!!z.icon?c[z.iconName]=z.icon:c[l]=z,c}),{});"function"!=typeof M.hooks.addPack||a?M.styles[l]=e({},M.styles[l]||{},m):M.hooks.addPack(l,m),"fas"===l&&c("fa",h)}("fab",f)}))}(),function(){"use strict";var c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}var h=(c.navigator||{}).userAgent,z=void 0===h?"":h,v=c,a=l,m=(v.document,!!a.documentElement&&!!a.head&&"function"==typeof a.addEventListener&&a.createElement,~z.indexOf("MSIE")||z.indexOf("Trident/"),function(){try{return!0}catch(c){return!1}}());function s(c,l,h){return l in c?Object.defineProperty(c,l,{value:h,enumerable:!0,configurable:!0,writable:!0}):c[l]=h,c}function e(c){for(var l=1;l2&&void 0!==arguments[2]?arguments[2]:{},v=z.skipHooks,a=void 0!==v&&v,m=Object.keys(h).reduce((function(c,l){var z=h[l];return!!z.icon?c[z.iconName]=z.icon:c[l]=z,c}),{});"function"!=typeof M.hooks.addPack||a?M.styles[l]=e({},M.styles[l]||{},m):M.hooks.addPack(l,m),"fas"===l&&c("fa",h)}("far",f)}))}(),function(){"use strict";var c={},l={};try{"undefined"!=typeof window&&(c=window),"undefined"!=typeof document&&(l=document)}catch(c){}var h=(c.navigator||{}).userAgent,z=void 0===h?"":h,v=c,a=l,m=(v.document,!!a.documentElement&&!!a.head&&"function"==typeof a.addEventListener&&a.createElement,~z.indexOf("MSIE")||z.indexOf("Trident/"),function(){try{return!0}catch(c){return!1}}());function s(c,l,h){return l in c?Object.defineProperty(c,l,{value:h,enumerable:!0,configurable:!0,writable:!0}):c[l]=h,c}function e(c){for(var l=1;l2&&void 0!==arguments[2]?arguments[2]:{},v=z.skipHooks,a=void 0!==v&&v,m=Object.keys(h).reduce((function(c,l){var z=h[l];return!!z.icon?c[z.iconName]=z.icon:c[l]=z,c}),{});"function"!=typeof M.hooks.addPack||a?M.styles[l]=e({},M.styles[l]||{},m):M.hooks.addPack(l,m),"fas"===l&&c("fa",h)}("fas",f)}))}(),function(){"use strict";function c(l){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(c){return typeof c}:function(c){return c&&"function"==typeof Symbol&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c})(l)}function l(c,l){for(var h=0;h-1;v--){var a=h[v],m=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(m)>-1&&(z=a)}return H.head.insertBefore(l,z),c}}function mc(){for(var c=12,l="";c-- >0;)l+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return l}function sc(c){for(var l=[],h=(c||[]).length>>>0;h--;)l[h]=c[h];return l}function ec(c){return c.classList?sc(c.classList):(c.getAttribute("class")||"").split(" ").filter((function(c){return c}))}function tc(c,l){var h,z=l.split("-"),v=z[0],a=z.slice(1).join("-");return v!==c||""===a||(h=a,~_.indexOf(h))?null:a}function Mc(c){return"".concat(c).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function fc(c){return Object.keys(c||{}).reduce((function(l,h){return l+"".concat(h,": ").concat(c[h],";")}),"")}function rc(c){return c.size!==vc.size||c.x!==vc.x||c.y!==vc.y||c.rotate!==vc.rotate||c.flipX||c.flipY}function nc(c){var l=c.transform,h=c.containerWidth,z=c.iconWidth,v={transform:"translate(".concat(h/2," 256)")},a="translate(".concat(32*l.x,", ").concat(32*l.y,") "),m="scale(".concat(l.size/16*(l.flipX?-1:1),", ").concat(l.size/16*(l.flipY?-1:1),") "),s="rotate(".concat(l.rotate," 0 0)");return{outer:v,inner:{transform:"".concat(a," ").concat(m," ").concat(s)},path:{transform:"translate(".concat(z/2*-1," -256)")}}}var Hc={x:0,y:0,width:"100%",height:"100%"};function ic(c){var l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return c.attributes&&(c.attributes.fill||l)&&(c.attributes.fill="black"),c}function oc(c){var l=c.icons,h=l.main,v=l.mask,a=c.prefix,m=c.iconName,s=c.transform,e=c.symbol,t=c.title,M=c.extra,f=c.watchable,r=void 0!==f&&f,n=v.found?v:h,H=n.width,i=n.height,o="fa-w-".concat(Math.ceil(H/i*16)),V=[O.replacementClass,m?"".concat(O.familyPrefix,"-").concat(m):"",o].filter((function(c){return-1===M.classes.indexOf(c)})).concat(M.classes).join(" "),C={children:[],attributes:z({},M.attributes,{"data-prefix":a,"data-icon":m,class:V,role:M.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(H," ").concat(i)})};r&&(C.attributes["data-fa-i2svg"]=""),t&&C.children.push({tag:"title",attributes:{id:C.attributes["aria-labelledby"]||"title-".concat(mc())},children:[t]});var L=z({},C,{prefix:a,iconName:m,main:h,mask:v,transform:s,symbol:e,styles:M.styles}),u=v.found&&h.found?function(c){var l,h=c.children,v=c.attributes,a=c.main,m=c.mask,s=c.transform,e=a.width,t=a.icon,M=m.width,f=m.icon,r=nc({transform:s,containerWidth:M,iconWidth:e}),n={tag:"rect",attributes:z({},Hc,{fill:"white"})},H=t.children?{children:t.children.map(ic)}:{},i={tag:"g",attributes:z({},r.inner),children:[ic(z({tag:t.tag,attributes:z({},t.attributes,r.path)},H))]},o={tag:"g",attributes:z({},r.outer),children:[i]},V="mask-".concat(mc()),C="clip-".concat(mc()),L={tag:"mask",attributes:z({},Hc,{id:V,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[n,o]},u={tag:"defs",children:[{tag:"clipPath",attributes:{id:C},children:(l=f,"g"===l.tag?l.children:[l])},L]};return h.push(u,{tag:"rect",attributes:z({fill:"currentColor","clip-path":"url(#".concat(C,")"),mask:"url(#".concat(V,")")},Hc)}),{children:h,attributes:v}}(L):function(c){var l=c.children,h=c.attributes,v=c.main,a=c.transform,m=fc(c.styles);if(m.length>0&&(h.style=m),rc(a)){var s=nc({transform:a,containerWidth:v.width,iconWidth:v.width});l.push({tag:"g",attributes:z({},s.outer),children:[{tag:"g",attributes:z({},s.inner),children:[{tag:v.icon.tag,children:v.icon.children,attributes:z({},v.icon.attributes,s.path)}]}]})}else l.push(v.icon);return{children:l,attributes:h}}(L),d=u.children,p=u.attributes;return L.children=d,L.attributes=p,e?function(c){var l=c.prefix,h=c.iconName,v=c.children,a=c.attributes,m=c.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:z({},a,{id:!0===m?"".concat(l,"-").concat(O.familyPrefix,"-").concat(h):m}),children:v}]}]}(L):function(c){var l=c.children,h=c.main,v=c.mask,a=c.attributes,m=c.styles,s=c.transform;if(rc(s)&&h.found&&!v.found){var e={x:h.width/h.height/2,y:.5};a.style=fc(z({},m,{"transform-origin":"".concat(e.x+s.x/16,"em ").concat(e.y+s.y/16,"em")}))}return[{tag:"svg",attributes:a,children:l}]}(L)}function Vc(c){var l=c.content,h=c.width,v=c.height,a=c.transform,m=c.title,s=c.extra,e=c.watchable,t=void 0!==e&&e,M=z({},s.attributes,m?{title:m}:{},{class:s.classes.join(" ")});t&&(M["data-fa-i2svg"]="");var f=z({},s.styles);rc(a)&&(f.transform=function(c){var l=c.transform,h=c.width,z=void 0===h?16:h,v=c.height,a=void 0===v?16:v,m=c.startCentered,s=void 0!==m&&m,e="";return e+=s&&L?"translate(".concat(l.x/zc-z/2,"em, ").concat(l.y/zc-a/2,"em) "):s?"translate(calc(-50% + ".concat(l.x/zc,"em), calc(-50% + ").concat(l.y/zc,"em)) "):"translate(".concat(l.x/zc,"em, ").concat(l.y/zc,"em) "),e+="scale(".concat(l.size/zc*(l.flipX?-1:1),", ").concat(l.size/zc*(l.flipY?-1:1),") "),e+="rotate(".concat(l.rotate,"deg) ")}({transform:a,startCentered:!0,width:h,height:v}),f["-webkit-transform"]=f.transform);var r=fc(f);r.length>0&&(M.style=r);var n=[];return n.push({tag:"span",attributes:M,children:[l]}),m&&n.push({tag:"span",attributes:{class:"sr-only"},children:[m]}),n}function Cc(c){var l=c.content,h=c.title,v=c.extra,a=z({},v.attributes,h?{title:h}:{},{class:v.classes.join(" ")}),m=fc(v.styles);m.length>0&&(a.style=m);var s=[];return s.push({tag:"span",attributes:a,children:[l]}),h&&s.push({tag:"span",attributes:{class:"sr-only"},children:[h]}),s}var Lc=function(){},uc=O.measurePerformance&&o&&o.mark&&o.measure?o:{mark:Lc,measure:Lc},dc='FA "5.12.1"',pc=function(c){uc.mark("".concat(dc," ").concat(c," ends")),uc.measure("".concat(dc," ").concat(c),"".concat(dc," ").concat(c," begins"),"".concat(dc," ").concat(c," ends"))},bc=function(c){return uc.mark("".concat(dc," ").concat(c," begins")),function(){return pc(c)}},gc=function(c,l,h,z){var v,a,m,s=Object.keys(c),e=s.length,t=void 0!==z?function(c,l){return function(h,z,v,a){return c.call(l,h,z,v,a)}}(l,z):l;for(void 0===h?(v=1,m=c[s[0]]):(v=0,m=h);v2&&void 0!==arguments[2]?arguments[2]:{},v=h.skipHooks,a=void 0!==v&&v,m=Object.keys(l).reduce((function(c,h){var z=l[h];return!!z.icon?c[z.iconName]=z.icon:c[h]=z,c}),{});"function"!=typeof E.hooks.addPack||a?E.styles[c]=z({},E.styles[c]||{},m):E.hooks.addPack(c,m),"fas"===c&&Sc("fa",l)}var yc=E.styles,wc=E.shims,kc={},_c={},xc={},Zc=function(){var c=function(c){return gc(yc,(function(l,h,z){return l[z]=gc(h,c,{}),l}),{})};kc=c((function(c,l,h){return l[3]&&(c[l[3]]=h),c})),_c=c((function(c,l,h){var z=l[2];return c[h]=h,z.forEach((function(l){c[l]=h})),c}));var l="far"in yc;xc=gc(wc,(function(c,h){var z=h[0],v=h[1],a=h[2];return"far"!==v||l||(v="fas"),c[z]={prefix:v,iconName:a},c}),{})};function Oc(c,l){return(kc[c]||{})[l]}Zc();var qc=E.styles;function Ec(c){return c.reduce((function(c,l){var h=tc(O.familyPrefix,l);if(qc[l])c.prefix=l;else if(O.autoFetchSvg&&["fas","far","fal","fad","fab","fa"].indexOf(l)>-1)c.prefix=l;else if(h){var z="fa"===c.prefix?xc[h]||{prefix:null,iconName:null}:{};c.iconName=z.iconName||h,c.prefix=z.prefix||c.prefix}else l!==O.replacementClass&&0!==l.indexOf("fa-w-")&&c.rest.push(l);return c}),{prefix:null,iconName:null,rest:[]})}function jc(c,l,h){if(c&&c[l]&&c[l][h])return{prefix:l,iconName:h,icon:c[l][h]}}function Nc(c){var l=c.tag,h=c.attributes,z=void 0===h?{}:h,v=c.children,a=void 0===v?[]:v;return"string"==typeof c?Mc(c):"<".concat(l," ").concat(function(c){return Object.keys(c||{}).reduce((function(l,h){return l+"".concat(h,'="').concat(Mc(c[h]),'" ')}),"").trim()}(z),">").concat(a.map(Nc).join(""),"")}var Pc=function(){};function Tc(c){return"string"==typeof(c.getAttribute?c.getAttribute("data-fa-i2svg"):null)}var Fc={replace:function(c){var l=c[0],h=c[1].map((function(c){return Nc(c)})).join("\n");if(l.parentNode&&l.outerHTML)l.outerHTML=h+(O.keepOriginalSource&&"svg"!==l.tagName.toLowerCase()?"\x3c!-- ".concat(l.outerHTML," --\x3e"):"");else if(l.parentNode){var z=document.createElement("span");l.parentNode.replaceChild(z,l),z.outerHTML=h}},nest:function(c){var l=c[0],h=c[1];if(~ec(l).indexOf(O.replacementClass))return Fc.replace(c);var z=new RegExp("".concat(O.familyPrefix,"-.*"));delete h[0].attributes.style,delete h[0].attributes.id;var v=h[0].attributes.class.split(" ").reduce((function(c,l){return l===O.replacementClass||l.match(z)?c.toSvg.push(l):c.toNode.push(l),c}),{toNode:[],toSvg:[]});h[0].attributes.class=v.toSvg.join(" ");var a=h.map((function(c){return Nc(c)})).join("\n");l.setAttribute("class",v.toNode.join(" ")),l.setAttribute("data-fa-i2svg",""),l.innerHTML=a}};function Wc(c){c()}function Rc(c,l){var h="function"==typeof l?l:Pc;if(0===c.length)h();else{var z=Wc;"async"===O.mutateApproach&&(z=n.requestAnimationFrame||Wc),z((function(){var l=!0===O.autoReplaceSvg?Fc.replace:Fc[O.autoReplaceSvg]||Fc.replace,z=bc("mutate");c.map(l),z(),h()}))}}var Ic=!1;function Yc(){Ic=!1}var Dc=null;function Uc(c){if(i&&O.observeMutations){var l=c.treeCallback,h=c.nodeCallback,z=c.pseudoElementsCallback,v=c.observeMutationsRoot,a=void 0===v?H:v;Dc=new i((function(c){Ic||sc(c).forEach((function(c){if("childList"===c.type&&c.addedNodes.length>0&&!Tc(c.addedNodes[0])&&(O.searchPseudoElements&&z(c.target),l(c.target)),"attributes"===c.type&&c.target.parentNode&&O.searchPseudoElements&&z(c.target.parentNode),"attributes"===c.type&&Tc(c.target)&&~w.indexOf(c.attributeName))if("class"===c.attributeName){var v=Ec(ec(c.target)),a=v.prefix,m=v.iconName;a&&c.target.setAttribute("data-prefix",a),m&&c.target.setAttribute("data-icon",m)}else h(c.target)}))})),C&&Dc.observe(a,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Qc(c){var l,h,z=c.getAttribute("data-prefix"),v=c.getAttribute("data-icon"),a=void 0!==c.innerText?c.innerText.trim():"",m=Ec(ec(c));return z&&v&&(m.prefix=z,m.iconName=v),m.prefix&&a.length>1?m.iconName=(l=m.prefix,h=c.innerText,(_c[l]||{})[h]):m.prefix&&1===a.length&&(m.iconName=Oc(m.prefix,Ac(c.innerText))),m}var Xc=function(c){var l={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return c?c.toLowerCase().split(" ").reduce((function(c,l){var h=l.toLowerCase().split("-"),z=h[0],v=h.slice(1).join("-");if(z&&"h"===v)return c.flipX=!0,c;if(z&&"v"===v)return c.flipY=!0,c;if(v=parseFloat(v),isNaN(v))return c;switch(z){case"grow":c.size=c.size+v;break;case"shrink":c.size=c.size-v;break;case"left":c.x=c.x-v;break;case"right":c.x=c.x+v;break;case"up":c.y=c.y-v;break;case"down":c.y=c.y+v;break;case"rotate":c.rotate=c.rotate+v}return c}),l):l};function Bc(c){var l=Qc(c),h=l.iconName,z=l.prefix,v=l.rest,a=function(c){var l=c.getAttribute("style"),h=[];return l&&(h=l.split(";").reduce((function(c,l){var h=l.split(":"),z=h[0],v=h.slice(1);return z&&v.length>0&&(c[z]=v.join(":").trim()),c}),{})),h}(c),m=function(c){return Xc(c.getAttribute("data-fa-transform"))}(c),s=function(c){var l=c.getAttribute("data-fa-symbol");return null!==l&&(""===l||l)}(c),e=function(c){var l=sc(c.attributes).reduce((function(c,l){return"class"!==c.name&&"style"!==c.name&&(c[l.name]=l.value),c}),{}),h=c.getAttribute("title");return O.autoA11y&&(h?l["aria-labelledby"]="".concat(O.replacementClass,"-title-").concat(mc()):(l["aria-hidden"]="true",l.focusable="false")),l}(c),t=function(c){var l=c.getAttribute("data-fa-mask");return l?Ec(l.split(" ").map((function(c){return c.trim()}))):{prefix:null,iconName:null,rest:[]}}(c);return{iconName:h,title:c.getAttribute("title"),prefix:z,transform:m,symbol:s,mask:t,extra:{classes:v,styles:a,attributes:e}}}function Kc(c){this.name="MissingIcon",this.message=c||"Icon unavailable",this.stack=(new Error).stack}Kc.prototype=Object.create(Error.prototype),Kc.prototype.constructor=Kc;var Gc={fill:"currentColor"},Jc={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},$c={tag:"path",attributes:z({},Gc,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},cl=z({},Jc,{attributeName:"opacity"}),ll={tag:"g",children:[$c,{tag:"circle",attributes:z({},Gc,{cx:"256",cy:"364",r:"28"}),children:[{tag:"animate",attributes:z({},Jc,{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:z({},cl,{values:"1;0;1;1;0;1;"})}]},{tag:"path",attributes:z({},Gc,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:[{tag:"animate",attributes:z({},cl,{values:"1;0;0;0;0;1;"})}]},{tag:"path",attributes:z({},Gc,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:z({},cl,{values:"0;0;1;1;0;0;"})}]}]},hl=E.styles;function zl(c){var l=c[0],h=c[1],z=v(c.slice(4),1)[0];return{found:!0,width:l,height:h,icon:Array.isArray(z)?{tag:"g",attributes:{class:"".concat(O.familyPrefix,"-").concat(k.GROUP)},children:[{tag:"path",attributes:{class:"".concat(O.familyPrefix,"-").concat(k.SECONDARY),fill:"currentColor",d:z[0]}},{tag:"path",attributes:{class:"".concat(O.familyPrefix,"-").concat(k.PRIMARY),fill:"currentColor",d:z[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:z}}}}function vl(l,h){return new hc((function(z,v){var a={found:!1,width:512,height:512,icon:ll};if(l&&h&&hl[h]&&hl[h][l])return z(zl(hl[h][l]));"object"===c(n.FontAwesomeKitConfig)&&"string"==typeof window.FontAwesomeKitConfig.token&&n.FontAwesomeKitConfig.token,l&&h&&!O.showMissingIcons?v(new Kc("Icon is missing for prefix ".concat(h," with icon name ").concat(l))):z(a)}))}var al=E.styles;function ml(c){var l=Bc(c);return~l.extra.classes.indexOf("fa-layers-text")?function(c,l){var h=l.title,z=l.transform,v=l.extra,a=null,m=null;if(L){var s=parseInt(getComputedStyle(c).fontSize,10),e=c.getBoundingClientRect();a=e.width/s,m=e.height/s}return O.autoA11y&&!h&&(v.attributes["aria-hidden"]="true"),hc.resolve([c,Vc({content:c.innerHTML,width:a,height:m,transform:z,title:h,extra:v,watchable:!0})])}(c,l):function(c,l){var h=l.iconName,z=l.title,a=l.prefix,m=l.transform,s=l.symbol,e=l.mask,t=l.extra;return new hc((function(l,M){hc.all([vl(h,a),vl(e.iconName,e.prefix)]).then((function(e){var M=v(e,2),f=M[0],r=M[1];l([c,oc({icons:{main:f,mask:r},prefix:a,iconName:h,transform:m,symbol:s,mask:r,title:z,extra:t,watchable:!0})])}))}))}(c,l)}function sl(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(C){var h=H.documentElement.classList,z=function(c){return h.add("".concat("fontawesome-i2svg","-").concat(c))},v=function(c){return h.remove("".concat("fontawesome-i2svg","-").concat(c))},a=O.autoFetchSvg?Object.keys(p):Object.keys(al),m=[".".concat("fa-layers-text",":not([").concat("data-fa-i2svg","])")].concat(a.map((function(c){return".".concat(c,":not([").concat("data-fa-i2svg","])")}))).join(", ");if(0!==m.length){var s=[];try{s=sc(c.querySelectorAll(m))}catch(c){}if(s.length>0){z("pending"),v("complete");var e=bc("onTree"),t=s.reduce((function(c,l){try{var h=ml(l);h&&c.push(h)}catch(c){d||c instanceof Kc&&console.error(c)}return c}),[]);return new hc((function(c,h){hc.all(t).then((function(h){Rc(h,(function(){z("active"),z("complete"),v("pending"),"function"==typeof l&&l(),e(),c()}))})).catch((function(){e(),h()}))}))}}}}function el(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;ml(c).then((function(c){c&&Rc([c],l)}))}function tl(c,l){var h="".concat("data-fa-pseudo-element-pending").concat(l.replace(":","-"));return new hc((function(v,a){if(null!==c.getAttribute(h))return v();var m=sc(c.children).filter((function(c){return c.getAttribute("data-fa-pseudo-element")===l}))[0],s=n.getComputedStyle(c,l),e=s.getPropertyValue("font-family").match(g),t=s.getPropertyValue("font-weight"),M=s.getPropertyValue("content");if(m&&!e)return c.removeChild(m),v();if(e&&"none"!==M&&""!==M){var f=~["Solid","Regular","Light","Duotone","Brands"].indexOf(e[1])?b[e[1].toLowerCase()]:A[t],r=Ac(3===M.length?M.substr(1,1):M),i=Oc(f,r),o=i;if(!i||m&&m.getAttribute("data-prefix")===f&&m.getAttribute("data-icon")===o)v();else{c.setAttribute(h,o),m&&c.removeChild(m);var V={iconName:null,title:null,prefix:null,transform:vc,symbol:!1,mask:null,extra:{classes:[],styles:{},attributes:{}}},C=V.extra;C.attributes["data-fa-pseudo-element"]=l,vl(i,f).then((function(a){var m=oc(z({},V,{icons:{main:a,mask:{prefix:null,iconName:null,rest:[]}},prefix:f,iconName:o,extra:C,watchable:!0})),s=H.createElement("svg");":before"===l?c.insertBefore(s,c.firstChild):c.appendChild(s),s.outerHTML=m.map((function(c){return Nc(c)})).join("\n"),c.removeAttribute(h),v()})).catch(a)}}else v()}))}function Ml(c){return hc.all([tl(c,":before"),tl(c,":after")])}function fl(c){return!(c.parentNode===document.head||~u.indexOf(c.tagName.toUpperCase())||c.getAttribute("data-fa-pseudo-element")||c.parentNode&&"svg"===c.parentNode.tagName)}function rl(c){if(C)return new hc((function(l,h){var z=sc(c.querySelectorAll("*")).filter(fl).map(Ml),v=bc("searchPseudoElements");Ic=!0,hc.all(z).then((function(){v(),Yc(),l()})).catch((function(){v(),Yc(),h()}))}))}function nl(){var c="svg-inline--fa",l=O.familyPrefix,h=O.replacementClass,z="svg:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-inline--fa.fa-w-19{width:1.1875em}.svg-inline--fa.fa-w-20{width:1.25em}.svg-inline--fa.fa-pull-left{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right{margin-left:.3em;width:auto}.svg-inline--fa.fa-border{height:1.5em}.svg-inline--fa.fa-li{width:2em}.svg-inline--fa.fa-fw{width:1.25em}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers-text{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter{background-color:#ff253a;border-radius:1em;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}.fad.fa-inverse{color:#fff}";if("fa"!==l||h!==c){var v=new RegExp("\\.".concat("fa","\\-"),"g"),a=new RegExp("\\--".concat("fa","\\-"),"g"),m=new RegExp("\\.".concat(c),"g");z=z.replace(v,".".concat(l,"-")).replace(a,"--".concat(l,"-")).replace(m,".".concat(h))}return z}function Hl(){O.autoAddCss&&!Ll&&(ac(nl()),Ll=!0)}function il(c,l){return Object.defineProperty(c,"abstract",{get:l}),Object.defineProperty(c,"html",{get:function(){return c.abstract.map((function(c){return Nc(c)}))}}),Object.defineProperty(c,"node",{get:function(){if(C){var l=H.createElement("div");return l.innerHTML=c.html,l.children}}}),c}function ol(c){var l=c.prefix,h=void 0===l?"fa":l,z=c.iconName;if(z)return jc(Cl.definitions,h,z)||jc(E.styles,h,z)}var Vl,Cl=new(function(){function c(){!function(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}(this,c),this.definitions={}}var h,v,a;return h=c,(v=[{key:"add",value:function(){for(var c=this,l=arguments.length,h=new Array(l),v=0;v0&&void 0!==arguments[0]?arguments[0]:{};if(C){Hl();var l=c.node,h=void 0===l?H:l,z=c.callback,v=void 0===z?function(){}:z;return O.searchPseudoElements&&rl(h),sl(h,v)}return hc.reject("Operation requires a DOM of some kind.")},css:nl,insertCss:function(){Ll||(ac(nl()),Ll=!0)},watch:function(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=c.autoReplaceSvgRoot,h=c.observeMutationsRoot;!1===O.autoReplaceSvg&&(O.autoReplaceSvg=!0),O.observeMutations=!0,P((function(){bl({autoReplaceSvgRoot:l}),Uc({treeCallback:sl,nodeCallback:el,pseudoElementsCallback:rl,observeMutationsRoot:h})}))}},dl=(Vl=function(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=l.transform,v=void 0===h?vc:h,a=l.symbol,m=void 0!==a&&a,s=l.mask,e=void 0===s?null:s,t=l.title,M=void 0===t?null:t,f=l.classes,r=void 0===f?[]:f,n=l.attributes,H=void 0===n?{}:n,i=l.styles,o=void 0===i?{}:i;if(c){var V=c.prefix,C=c.iconName,L=c.icon;return il(z({type:"icon"},c),(function(){return Hl(),O.autoA11y&&(M?H["aria-labelledby"]="".concat(O.replacementClass,"-title-").concat(mc()):(H["aria-hidden"]="true",H.focusable="false")),oc({icons:{main:zl(L),mask:e?zl(e.icon):{found:!1,width:null,height:null,icon:{}}},prefix:V,iconName:C,transform:z({},vc,v),symbol:m,title:M,extra:{attributes:H,styles:o,classes:r}})}))}},function(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=(c||{}).icon?c:ol(c||{}),v=l.mask;return v&&(v=(v||{}).icon?v:ol(v||{})),Vl(h,z({},l,{mask:v}))}),pl={noAuto:function(){O.autoReplaceSvg=!1,O.observeMutations=!1,Dc&&Dc.disconnect()},config:O,dom:ul,library:Cl,parse:{transform:function(c){return Xc(c)}},findIconDefinition:ol,icon:dl,text:function(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=l.transform,v=void 0===h?vc:h,m=l.title,s=void 0===m?null:m,e=l.classes,t=void 0===e?[]:e,M=l.attributes,f=void 0===M?{}:M,r=l.styles,n=void 0===r?{}:r;return il({type:"text",content:c},(function(){return Hl(),Vc({content:c,transform:z({},vc,v),title:s,extra:{attributes:f,styles:n,classes:["".concat(O.familyPrefix,"-layers-text")].concat(a(t))}})}))},counter:function(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=l.title,z=void 0===h?null:h,v=l.classes,m=void 0===v?[]:v,s=l.attributes,e=void 0===s?{}:s,t=l.styles,M=void 0===t?{}:t;return il({type:"counter",content:c},(function(){return Hl(),Cc({content:c.toString(),title:z,extra:{attributes:e,styles:M,classes:["".concat(O.familyPrefix,"-layers-counter")].concat(a(m))}})}))},layer:function(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=l.classes,z=void 0===h?[]:h;return il({type:"layer"},(function(){Hl();var l=[];return c((function(c){Array.isArray(c)?c.map((function(c){l=l.concat(c.abstract)})):l=l.concat(c.abstract)})),[{tag:"span",attributes:{class:["".concat(O.familyPrefix,"-layers")].concat(a(z)).join(" ")},children:l}]}))},toHtml:Nc},bl=function(){var c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=c.autoReplaceSvgRoot,h=void 0===l?H:l;(Object.keys(E.styles).length>0||O.autoFetchSvg)&&C&&O.autoReplaceSvg&&pl.dom.i2svg({node:h})};!function(c){try{c()}catch(c){if(!d)throw c}}((function(){V&&(n.FontAwesome||(n.FontAwesome=pl),P((function(){bl(),Uc({treeCallback:sl,nodeCallback:el,pseudoElementsCallback:rl})}))),E.hooks=z({},E.hooks,{addPack:function(c,l){E.styles[c]=z({},E.styles[c]||{},l),Zc(),bl()},addShims:function(c){var l;(l=E.shims).push.apply(l,a(c)),Zc(),bl()}})}))}(); \ No newline at end of file diff --git a/RIGS/urls.py b/RIGS/urls.py index 98a5c9e7..db3f7c5e 100644 --- a/RIGS/urls.py +++ b/RIGS/urls.py @@ -1,9 +1,6 @@ from django.urls import path from django.conf.urls import url -from django.contrib.auth.views import PasswordResetView - from django.contrib.auth.decorators import login_required -from django.contrib.auth.views import LoginView from RIGS import models, views, rigboard, finance, ical, versioning, forms from django.views.generic import RedirectView from django.views.decorators.clickjacking import xframe_options_exempt @@ -12,15 +9,9 @@ from PyRIGS.decorators import permission_required_with_403, has_oembed from PyRIGS.decorators import api_key_required urlpatterns = [ - # Examples: - # url(r'^$', 'PyRIGS.views.home', name='home'), - # url(r'^blog/', include('blog.urls')), - url('^$', login_required(views.Index.as_view()), name='index'), + path('', login_required(views.Index.as_view()), name='index'), url(r'^closemodal/$', views.CloseModal.as_view(), name='closemodal'), - path('user/login/', LoginView.as_view(authentication_form=forms.CheckApprovedForm), name='login'), - path('user/login/embed/', xframe_options_exempt(views.LoginEmbed.as_view()), name='login_embed'), - url(r'^search_help/$', views.SearchHelp.as_view(), name='search_help'), # People @@ -169,16 +160,6 @@ urlpatterns = [ url(r'^event/(?P\d+)/(?P[-:\w]+)/$', rigboard.EventAuthorise.as_view(), name='event_authorise'), - # User editing - url(r'^user/$', login_required(views.ProfileDetail.as_view()), name='profile_detail'), - url(r'^user/(?P\d+)/$', - permission_required_with_403('RIGS.view_profile')(views.ProfileDetail.as_view()), - name='profile_detail'), - url(r'^user/edit/$', login_required(views.ProfileUpdateSelf.as_view()), - name='profile_update_self'), - url(r'^user/reset_api_key$', login_required(views.ResetApiKey.as_view(permanent=False)), - name='reset_api_key'), - # ICS Calendar - API key authentication url(r'^ical/(?P\d+)/(?P\w+)/rigs.ics$', api_key_required(ical.CalendarICS()), name="ics_calendar"), diff --git a/RIGS/templates/admin_associate_merge.html b/templates/admin_associate_merge.html similarity index 100% rename from RIGS/templates/admin_associate_merge.html rename to templates/admin_associate_merge.html