Skip to content
  • Mike Kelly's avatar
    Restructure usr_custom_layout table to take groups into account · 2214b02a
    Mike Kelly authored and Robert Lyon's avatar Robert Lyon committed
    
    
    Bug #1266317
    
    Group pages, site and institution pages were set as having usr = 0 in
    usr_custom_layout because the view owner is null.
    
    Fix by adding group column to table, foreign keyed to group table.
    
    usr column and group column have to be changed to allow null values, and
    to have null as default values.
    
    When saving a custom layout, check context, then set usr and group
    values accordingly. 
    e.g. 
    usr = 5, group = null 
    usr = null, group = 321
    In the case of site and institution pages:
    usr = null, group = null
    
    Change-Id: Id42ebcc543d29ee2455aef73227b57c569171385
    Signed-off-by: default avatarMike Kelly <m.f.kelly@arts.ac.uk>
    2214b02a