Skip to content

Instantly share code, notes, and snippets.

View splinter's full-sized avatar

Sameera Medagammaddegedara splinter

View GitHub Profile
var renderLCActions = function() {
var container = config(constants.CONTAINER_LC_ACTION_AREA);
var impl = LifecycleAPI.lifecycle();
var actions;
var action;
// var action;
if (impl) {
actions = impl.actions();
var data = {};
var map = data.actions = [];
@splinter
splinter / store-user.js
Last active April 11, 2016 10:11
Accessing tenant details for the current user in the ES/G-Reg Store
var tenantApi = require('/modules/tenant-api.js').api;
var tenantDetails = tenantApi.createTenantDetails(request,session);
print('Tenant Id: '+tenantDetails.tenantId);
print('Tenant domain: '+tenantDetails.domain);
@splinter
splinter / user.js
Created April 11, 2016 07:01
Accessing the logged in user in the ES/G-Reg Publisher
var server = require('store').server;
var user = server.current(session);
print('username : '+ user.username);
@splinter
splinter / gist:6249520
Last active December 21, 2015 04:29
Basic usage of the snoop helper
var context={
fruits:[
{
name:'apples',
label:'I like salted apples',
value:'1',
info:{
some_data:'Have some more apples!'