Esempio n. 1
0
 /// <summary>
 /// Adds an update trigger for when the block instance properties are updated.
 /// </summary>
 /// <param name="updatePanel">The update panel.</param>
 public void AddAttributeUpdateTrigger(UpdatePanel updatePanel)
 {
     if (BlockInstance.Authorized("Configure", CurrentUser))
     {
         AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
         trigger.ControlID = string.Format("blck-cnfg-trggr-{0}", BlockInstance.Id);
         trigger.EventName = "Click";
         updatePanel.Triggers.Add(trigger);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Evaluates if the user is authorized to perform the requested action
 /// </summary>
 /// <param name="action"></param>
 /// <returns></returns>
 public bool UserAuthorized(string action)
 {
     return(BlockInstance.Authorized(action, CurrentUser));
 }