In this paper, we study the action of diamond operators on Hilbert modular forms with coefficients in a general commutative ring. In particular, we generalize a result of Chai on the surjectivity of the constant term map for Hilbert modular forms with nebentype to the setting of group ring valued modular forms. As an application, we construct certain Hilbert modular forms required for Dasgupta-Kakde's proof of the Brumer-Stark conjecture at odd primes. Since the forms required for the Brumer-Stark conjecture live on the non-PEL Shimura variety associated to the reductive group G=ResF/Q(GL2)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G = \,\textrm{Res}\,_{F/\textbf{Q}}({\textbf{GL}}_2)$$\end{document}, as opposed to the PEL Shimura variety associated to the subgroup G*subset of G\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G<^>* \subset G$$\end{document} studied by Chai, we give a detailed explanation of theory of algebraic diamond operators for G, as well as how the theory of toroidal and minimal compactifications for G may be deduced from the analogous theory for G*\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G<^>*$$\end{document}.